org.jboss.cache.buddyreplication
Class GravitateResult

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

public class GravitateResult
extends 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
 boolean equals(Object o)
           
 Fqn getBuddyBackupFqn()
           
 List<NodeData> getNodeData()
           
 int hashCode()
           
 boolean isDataFound()
           
static GravitateResult noDataFound()
          Factory method that creates a GravitateResult indicating that no data has been found.
static GravitateResult subtreeResult(List<NodeData> nodeData, Fqn fqn)
          Factory method that creates a GravitateResult with the data found and the backup fqn it was found in.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, 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(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 List<NodeData> getNodeData()
Returns:
the nodeData

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2009 JBoss, a division of Red Hat. All Rights Reserved.