fulmine.distribution
Interface IDistributionState

All Superinterfaces:
IDestroyable, ILifeCycle

public interface IDistributionState
extends ILifeCycle

Interface for the shared state object of the DistributionManager.

Author:
Ramon Servadei

Method Summary
 IChannelFactory createChannelFactory()
          Create the channel factory to use
 IChannelFactory getChannelFactory()
          Constructs the channels
 Map<String,IChannel> getChannels()
          The channels in use, keyed on remote context identity.
 IReferenceCounter<String> getConnectedContexts()
          Tracks number of connections to other remote contexts.
 IReferenceCounter<String> getCONNECTINGContexts()
          Tracks whether this context is CONNECTING to a remote context (identified by the IConnectionParameters.getRemoteContextIdentity()).
 IFrameworkContext getContext()
          The context
 Map<String,IConnectionParameters> getDiscoveredContexts()
          The discovered contexts, keyed on remote context identity.
 ILifeCycleEventListener getEventHandler()
          Get the event handler
 IFrameReader getFrameReader()
          The frame reader
 IFrameWriter getFrameWriter()
          The frame writer
 IAutoCreatingStore<String,Set<DualValue<ISubscriptionParameters,IEventListener>>> getRemoteSubscriptions()
          Tracks all the subscriptions per remote context.
 IRemoteUpdateInvoker getRemoteUpdateInvoker(String remoteContextIdentity)
          Get the IRemoteUpdateInvoker to use for updating remote containers
 ISubscriptionManager getSubscriptionManager()
          Handles the subscriptions for local containers
 void init()
          Initialise the state
 void setChannels(Map<String,IChannel> channels)
          Set the channels.
 
Methods inherited from interface fulmine.ILifeCycle
isActive, start
 
Methods inherited from interface fulmine.IDestroyable
destroy
 

Method Detail

init

void init()
Initialise the state


createChannelFactory

IChannelFactory createChannelFactory()
Create the channel factory to use


getChannelFactory

IChannelFactory getChannelFactory()
Constructs the channels


getEventHandler

ILifeCycleEventListener getEventHandler()
Get the event handler


getChannels

Map<String,IChannel> getChannels()
The channels in use, keyed on remote context identity. This uses copy-on-write concurrency.


getDiscoveredContexts

Map<String,IConnectionParameters> getDiscoveredContexts()
The discovered contexts, keyed on remote context identity.

Access to this must be synchronised on the IDistributionState.


getSubscriptionManager

ISubscriptionManager getSubscriptionManager()
Handles the subscriptions for local containers


getRemoteSubscriptions

IAutoCreatingStore<String,Set<DualValue<ISubscriptionParameters,IEventListener>>> getRemoteSubscriptions()
Tracks all the subscriptions per remote context. These are persisted for the duration of this context so that re-subscription can occur in the event of a remote context re-connecting.

Access to this must be synchronised on the IDistributionState.


getConnectedContexts

IReferenceCounter<String> getConnectedContexts()
Tracks number of connections to other remote contexts. Used to ensure there are no duplicate connections to a single remote context.

Access to this must be synchronised on the IDistributionState.


getCONNECTINGContexts

IReferenceCounter<String> getCONNECTINGContexts()
Tracks whether this context is CONNECTING to a remote context (identified by the IConnectionParameters.getRemoteContextIdentity()). This ensures that the CONNECTING operation to a remote context is idempotent.

Access to this must be synchronised on the IDistributionState


getContext

IFrameworkContext getContext()
The context


getFrameReader

IFrameReader getFrameReader()
The frame reader


getFrameWriter

IFrameWriter getFrameWriter()
The frame writer


setChannels

void setChannels(Map<String,IChannel> channels)
Set the channels.

Access to this must be synchronised on the IDistributionState. Uses the 'cheap read-write lock'


getRemoteUpdateInvoker

IRemoteUpdateInvoker getRemoteUpdateInvoker(String remoteContextIdentity)
Get the IRemoteUpdateInvoker to use for updating remote containers

Parameters:
remoteContextIdentity - the remote context the invoker handles
Returns:
the IRemoteUpdateInvoker


Copyright © 2007-2009. All Rights Reserved.