org.jboss.cache.buddyreplication
Class GravitateResult

java.lang.Object
  extended by org.jboss.cache.buddyreplication.GravitateResult

public class GravitateResult
extends java.lang.Object

A class that encapsulates the result of a data gravitation call, a part of the Buddy Replication framwork. A GravitateResult contains 3 elements; a boolean indicating whether the gravitation request found any data at all, a List of NodeData objects containing the data to be gravitated, and an Fqn of the buddy backup region being gravitated.

Since:
2.0.0

Method Summary
 Fqn getBuddyBackupFqn()
           
 java.util.List<NodeData> getNodeData()
           
 boolean isDataFound()
           
static GravitateResult noDataFound()
          Factory method that creates a GravitateResult indicating that no data has been found.
static GravitateResult subtreeResult(java.util.List<NodeData> nodeData, Fqn fqn)
          Factory method that creates a GravitateResult with the data found and the backup fqn it was found in.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

noDataFound

public static GravitateResult noDataFound()
Factory method that creates a GravitateResult indicating that no data has been found.

Returns:
GravitateResult encapsulating the fact that no data was found

subtreeResult

public static GravitateResult subtreeResult(java.util.List<NodeData> nodeData,
                                            Fqn fqn)
Factory method that creates a GravitateResult with the data found and the backup fqn it was found in.

Parameters:
nodeData - data found
fqn - backup fqn the data was found in
Returns:
GravitateResult encapsulating the above

getBuddyBackupFqn

public Fqn getBuddyBackupFqn()
Returns:
the buddyBackupFqn

isDataFound

public boolean isDataFound()
Returns:
true if data was found

getNodeData

public java.util.List<NodeData> getNodeData()
Returns:
the nodeData

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object