public abstract class AbstractClusterManager extends Object implements IClusterManager
IClusterManager
,
independent of communication form.Modifier and Type | Field and Description |
---|---|
protected boolean |
processTransmissionsReceived
Indicates whether
transmissionReceived(IClusterTransmission)
processes the given transmission. |
protected String |
serverId
The identifier for this cluster node.
|
Constructor and Description |
---|
AbstractClusterManager() |
Modifier and Type | Method and Description |
---|---|
IClusterCommand |
createClusterCommand(Runnable runnable)
Creates a cluster command instance and returns it.
|
IClusterMessage |
createClusterMessage(String group,
Serializable data)
Creates a cluster message instance and returns it.
|
void |
destroy()
Destroys the cluster manager.
|
void |
init()
Initializes the cluster manager.
|
abstract void |
send(IClusterTransmission transmission)
Sends a transmission.
|
protected void |
transmissionReceived(IClusterTransmission transmission)
Processes a received transmission.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getClusterConfig, getLocalMember, getMembers
protected String serverId
protected boolean processTransmissionsReceived
transmissionReceived(IClusterTransmission)
processes the given transmission.protected void transmissionReceived(IClusterTransmission transmission)
processTransmissionsReceived
may be used to disable the processing done by this method.transmission
- the transmission received.public void init()
IClusterManager
init
in interface IClusterManager
public void destroy()
IClusterManager
destroy
in interface IClusterManager
public abstract void send(IClusterTransmission transmission)
IClusterManager
send
in interface IClusterManager
transmission
- the transmission. It must have been created using
one of the factory methods available in IClusterManager
.IClusterManager.createClusterCommand(Runnable)
,
IClusterManager.createClusterMessage(String, Serializable)
public IClusterCommand createClusterCommand(Runnable runnable)
IClusterManager
createClusterCommand
in interface IClusterManager
runnable
- the runnable that contains the command's execution. It
must be serializable.IClusterCommand
public IClusterMessage createClusterMessage(String group, Serializable data)
IClusterManager
createClusterMessage
in interface IClusterManager
group
- the destination group for the message.data
- the data sent in the message.IClusterMessage
Lumisportal 7.1.1.140331 - Copyright © 2006–2014 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.