org.tranche.network
Class StatusTableEvent

java.lang.Object
  extended by org.tranche.network.StatusTableEvent

public class StatusTableEvent
extends java.lang.Object

Wraps the information describing a status table modification.

Author:
James "Augie" Hill - augman85@gmail.com

Field Summary
static boolean DEFAULT_AFFECTS_CONNECTIVITY
          The default value for whether this event affects the connectivity of the server.
static boolean DEFAULT_AFFECTS_HASH_SPANS
           
 
Constructor Summary
StatusTableEvent(java.util.Collection<java.lang.String> hosts)
          
StatusTableEvent(java.util.Map<java.lang.String,java.lang.Boolean> hosts, java.util.Map<java.lang.String,java.lang.Boolean> affectsHashSpans)
           
StatusTableEvent(java.lang.String host)
           
StatusTableEvent(java.lang.String host, boolean affectsConnectivity, boolean affectsHashSpans)
           
 
Method Summary
 boolean affectedConnectivity(java.lang.String host)
          
 boolean affectedHashSpans(java.lang.String host)
          
 java.util.Set<java.lang.String> getHosts()
          Returns a map of host names to whether the event affects the connectivity of the server.
 long getTimestamp()
          Returns the timestamp the event occurred.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_AFFECTS_CONNECTIVITY

public static final boolean DEFAULT_AFFECTS_CONNECTIVITY

The default value for whether this event affects the connectivity of the server.

See Also:
Constant Field Values

DEFAULT_AFFECTS_HASH_SPANS

public static final boolean DEFAULT_AFFECTS_HASH_SPANS
See Also:
Constant Field Values
Constructor Detail

StatusTableEvent

public StatusTableEvent(java.lang.String host,
                        boolean affectsConnectivity,
                        boolean affectsHashSpans)
Parameters:
host - A host name
affectsConnectivity - Whether this event affects the connectivity of the server
affectsHashSpans - Whether this even affects the hash spans of the server

StatusTableEvent

public StatusTableEvent(java.lang.String host)
Parameters:
host - A host name

StatusTableEvent

public StatusTableEvent(java.util.Map<java.lang.String,java.lang.Boolean> hosts,
                        java.util.Map<java.lang.String,java.lang.Boolean> affectsHashSpans)
Parameters:
hosts - Host names to whether the event affects the connectivity of the server
affectsHashSpans - Host names to whether the event affects the hash spans of the server

StatusTableEvent

public StatusTableEvent(java.util.Collection<java.lang.String> hosts)

Parameters:
hosts -
Method Detail

getHosts

public java.util.Set<java.lang.String> getHosts()

Returns a map of host names to whether the event affects the connectivity of the server.

Returns:
A map of host names to whether the event affects the connectivity of the server

affectedConnectivity

public boolean affectedConnectivity(java.lang.String host)

Parameters:
host -
Returns:

affectedHashSpans

public boolean affectedHashSpans(java.lang.String host)

Parameters:
host -
Returns:

getTimestamp

public long getTimestamp()

Returns the timestamp the event occurred.

Returns:
The timestamp the event occurred.


This code is free for use both commercially and non-commercially as stated in the project's license