net.user1.union.api
Interface Cluster


public interface Cluster

The cluster controls behaviour related to communication within the cluster.


Method Summary
 java.lang.String getAffinityAddress()
          Get the affinity address for the node if configured.
 int getAffinityDuration()
          Get the affinity duration for the node if configured.
 java.util.Set<java.lang.String> getNodeIDs()
          Get a list of node IDs connected to the server.
 void resetNodeStreams()
          Reset the communication streams for all of the nodes connected within the cluster.
 void setAffinityAddress(java.lang.String affinityAddress)
          Set the affinity address that will be sent in the u66 (SERVER_HELLO).
 void setAffinityDuration(int affinityDuration)
          Set the affinity duration that will be sent in the u66 (SERVER_HELL).
 

Method Detail

getAffinityAddress

java.lang.String getAffinityAddress()
Get the affinity address for the node if configured.

Returns:
the affinity address for the node if configured

setAffinityAddress

void setAffinityAddress(java.lang.String affinityAddress)
Set the affinity address that will be sent in the u66 (SERVER_HELLO). The affinity address is used to tell a client to make subsequent connection requests to the given address rather than through a load balancer. A DNS name or IP address or both valid but DNS name is recommended.

Parameters:
affinityAddress - the affinity address that will be sent in the u66

getAffinityDuration

int getAffinityDuration()
Get the affinity duration for the node if configured.

Returns:
the affinity duration for the node if configured

setAffinityDuration

void setAffinityDuration(int affinityDuration)
Set the affinity duration that will be sent in the u66 (SERVER_HELL). The affinity duration is the time, in minutes, that the client should consider the affinity address to be valid after which it should go back to using the load balancing address.

Parameters:
affinityDuration - the affinity duration that will be sent in the u66

getNodeIDs

java.util.Set<java.lang.String> getNodeIDs()
Get a list of node IDs connected to the server.

Returns:
a list of node IDs connected to the server

resetNodeStreams

void resetNodeStreams()
Reset the communication streams for all of the nodes connected within the cluster. Call this method if you have just dispatched a very large eventObject (including any contained Objects) that is very large and you want to ensure that it has been removed from the stream cache immediately rather than waiting for the automatic reset initiated periodically by the server. For example, if you have dispatched an event Object that contains moderately sized individual updates for 20000 players.



Copyright USER1 Subsystems Corporation - Tue Jan 28 2014, 05:05 PM -0500