public class SingleServerClusterManager extends AbstractClusterManager
processTransmissionsReceived, serverId
Constructor and Description |
---|
SingleServerClusterManager() |
Modifier and Type | Method and Description |
---|---|
<T extends Serializable> |
call(IClusterCommand<T> command)
Calls a cluster command execution and returns the result of the local execution.
|
protected <T extends Serializable> |
callAndWaitResponsesInternal(IClusterCallable<T> callable,
long timeout) |
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 |
send(IClusterTransmission transmission)
Sends a transmission.
|
callAndWaitResponses, createClusterCommand, createClusterCommand, createClusterMessage, destroy, init, transmissionReceived
public void send(IClusterTransmission transmission)
IClusterManager
transmission
- the transmission. It must have been created using
one of the factory methods available in IClusterManager
.IClusterManager.createClusterCommand(IClusterCallable)
,
IClusterManager.createClusterMessage(String, Serializable)
public <T extends Serializable> T call(IClusterCommand<T> command) throws Exception
IClusterManager
This method sends the command through the cluster and gives feedback on the local server execution, in the form of the return value and the raised exception.
It is important to notice that the command will be sent over the cluster despite its execution outcome.
The given command must have been created through IClusterManager.createClusterCommand(IClusterCallable)
.
command
- the command to execute through the cluster.Exception
- the exception thrown during command execution or other unknown exception.protected <T extends Serializable> Map<IClusterMember,T> callAndWaitResponsesInternal(IClusterCallable<T> callable, long timeout) throws ClusterInvocationException, TimeoutException, InterruptedException
callAndWaitResponsesInternal
in class AbstractClusterManager
ClusterInvocationException
TimeoutException
InterruptedException
#callAndWaitResponses(IClusterCommand, long)
public Collection<IClusterMember> getMembers()
IClusterManager
public IClusterMember getLocalMember()
IClusterManager
public IClusterConfig getClusterConfig(ITransaction transaction) throws PortalException
IClusterManager
transaction
- the transaction for persistence access.PortalException
LumisXP 12.2.0.200122 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.