|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@StableMinor(version="5.5", sinceVersion="4.1") public interface IClusterManager
Provides operations on the portal cluster.
A message may be sent by creating it using createClusterMessage(String, Serializable)
and sending the IClusterMessage
object returned by calling
send(IClusterTransmission)
. When received, the message generates
a ClusterMessageReceivedEvent
.
A command may be sent by creating it using createClusterCommand(Runnable)
and sending the IClusterCommand
object returned by calling
send(IClusterTransmission)
. When received, the command executes
the corresponding Runnable
code.
Either the message or the command, can be further configured before sending by using the available methods in the returned object.
IClusterMessage
,
IClusterCommand
Method Summary | |
---|---|
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. |
IClusterConfig |
getClusterConfig(ITransaction transaction)
Returns a persistent cluster configuration object. |
IClusterMember |
getLocalMember()
Returns the current cluster member object. |
Collection<IClusterMember> |
getMembers()
Returns a collection with information about the current members of this cluster. |
void |
init()
Initializes the cluster manager. |
void |
send(IClusterTransmission transmission)
Sends a transmission. |
Method Detail |
---|
void init()
void destroy()
void send(IClusterTransmission transmission)
transmission
- the transmission. It must have been created using
one of the factory methods available in IClusterManager
.createClusterCommand(Runnable)
,
createClusterMessage(String, Serializable)
Collection<IClusterMember> getMembers() throws PortalException
PortalException
IClusterMember getLocalMember()
IClusterMessage createClusterMessage(String group, Serializable data)
group
- the destination group for the message.data
- the data sent in the message.
IClusterMessage
IClusterCommand createClusterCommand(Runnable runnable)
runnable
- the runnable that contains the command's execution. It
must be serializable.IClusterCommand
IClusterConfig getClusterConfig(ITransaction transaction) throws PortalException
transaction
- the transaction for persistence access.
PortalException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |