|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.cache.commands.AbstractVisitor
org.jboss.cache.buddyreplication.BuddyFqnTransformer
public class BuddyFqnTransformer
For each command the fqns are chnaged such that they are under the current buddy group's backup subtree (e.g., /_buddy_backup_/my_host:7890/) rather than the root (/).
| Field Summary | |
|---|---|
static String |
BUDDY_BACKUP_SUBTREE
|
static Fqn<String> |
BUDDY_BACKUP_SUBTREE_FQN
|
| Constructor Summary | |
|---|---|
BuddyFqnTransformer(String buddyGroupName)
|
|
BuddyFqnTransformer(String buddyGroupName,
CommandsFactory cf)
|
|
| Method Summary | |
|---|---|
static Fqn |
getActualFqn(Fqn fqn)
|
static Fqn |
getBackupFqn(org.jgroups.Address dataOwnerAddress,
Fqn origFqn)
Utility method that retrieves a buddy backup Fqn given the actual Fqn of some data and the data owner's Address. |
Fqn |
getBackupFqn(Fqn originalFqn)
Assumes the backup Fqn if the current instance is the data owner. |
static Fqn |
getBackupFqn(Fqn buddyGroupRoot,
Fqn origFqn)
Utility method that retrieves a buddy backup Fqn given the actual Fqn of some data and the backup subtree for the buddy group in question |
static Fqn |
getBackupFqn(String buddyGroupName,
Fqn origFqn)
Utility method that retrieves a buddy backup Fqn given the actual Fqn of some data and the buddy group name. |
static Fqn<String> |
getBackupRoot(org.jgroups.Address dataOwner)
|
static Fqn |
getBackupRootFromFqn(Fqn fqn)
Returns the buddy backp root portion of a given Fqn, provided it is a backup Fqn. |
static Fqn<String> |
getDeadBackupRoot(org.jgroups.Address dataOwner)
Returns the backup root of a dead data owner |
static String |
getGroupNameFromAddress(org.jgroups.Address address)
|
static boolean |
isBackupFqn(Fqn name)
|
static boolean |
isDeadBackupFqn(Fqn name)
Tests whether a given Fqn belongs to a dead backup region. |
static boolean |
isDeadBackupRoot(Fqn f)
|
List<ReversibleCommand> |
transformBatch(List<ReversibleCommand> toTransform)
|
Object |
visitClearDataCommand(InvocationContext ctx,
ClearDataCommand command)
Visits a RemoveDataCommand. |
Object |
visitCommitCommand(InvocationContext ctx,
CommitCommand commitCommand)
Visits a CommitCommand. |
Object |
visitCreateNodeCommand(InvocationContext ctx,
CreateNodeCommand command)
Visits a CreateNodeCommand. |
Object |
visitEvictFqnCommand(InvocationContext ctx,
EvictCommand command)
Visits a EvictCommand. |
Object |
visitExistsNodeCommand(InvocationContext ctx,
ExistsCommand command)
Visits a RemoteExistsCommand. |
Object |
visitGetChildrenNamesCommand(InvocationContext ctx,
GetChildrenNamesCommand command)
Visits a GetChildrenNamesCommand. |
Object |
visitGetDataMapCommand(InvocationContext ctx,
GetDataMapCommand command)
Visits a GetDataMapCommand. |
Object |
visitGetKeysCommand(InvocationContext ctx,
GetKeysCommand command)
Visits a GetKeysCommand. |
Object |
visitGetKeyValueCommand(InvocationContext ctx,
GetKeyValueCommand command)
Visits a GetKeyValueCommand. |
Object |
visitGetNodeCommand(InvocationContext ctx,
GetNodeCommand command)
Visits a GetNodeCommand. |
Object |
visitGravitateDataCommand(InvocationContext ctx,
GravitateDataCommand command)
Visits a GravitateDataCommand. |
Object |
visitInvalidateCommand(InvocationContext ctx,
InvalidateCommand command)
Visits a InvalidateCommand. |
Object |
visitMoveCommand(InvocationContext ctx,
MoveCommand command)
Visits a MoveCommand. |
Object |
visitOptimisticPrepareCommand(InvocationContext ctx,
OptimisticPrepareCommand command)
Visits a OptimisticPrepareCommand. |
Object |
visitPrepareCommand(InvocationContext ctx,
PrepareCommand command)
Visits a PrepareCommand. |
Object |
visitPutDataMapCommand(InvocationContext ctx,
PutDataMapCommand command)
Visits a PutDataMapCommand. |
Object |
visitPutForExternalReadCommand(InvocationContext ctx,
PutForExternalReadCommand command)
Visits a PutForExternalReadCommand. |
Object |
visitPutKeyValueCommand(InvocationContext ctx,
PutKeyValueCommand command)
Visits a PutKeyValueCommand. |
Object |
visitRemoveKeyCommand(InvocationContext ctx,
RemoveKeyCommand command)
Visits a RemoveKeyCommand. |
Object |
visitRemoveNodeCommand(InvocationContext ctx,
RemoveNodeCommand command)
Visits a RemoveNodeCommand. |
Object |
visitRollbackCommand(InvocationContext ctx,
RollbackCommand command)
Visits a RollbackCommand. |
| Methods inherited from class org.jboss.cache.commands.AbstractVisitor |
|---|
handleDefault, visitCollection |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String BUDDY_BACKUP_SUBTREE
public static final Fqn<String> BUDDY_BACKUP_SUBTREE_FQN
| Constructor Detail |
|---|
public BuddyFqnTransformer(String buddyGroupName)
public BuddyFqnTransformer(String buddyGroupName,
CommandsFactory cf)
| Method Detail |
|---|
public Object visitCommitCommand(InvocationContext ctx,
CommitCommand commitCommand)
throws Throwable
Visitor
visitCommitCommand in interface VisitorvisitCommitCommand in class AbstractVisitorctx - invocation contextcommitCommand - command to visit
Throwable - in the event of problems.
public Object visitPutDataMapCommand(InvocationContext ctx,
PutDataMapCommand command)
throws Throwable
Visitor
visitPutDataMapCommand in interface VisitorvisitPutDataMapCommand in class AbstractVisitorctx - invocation contextcommand - command to visit
Throwable - in the event of problems.
public Object visitPutKeyValueCommand(InvocationContext ctx,
PutKeyValueCommand command)
throws Throwable
Visitor
visitPutKeyValueCommand in interface VisitorvisitPutKeyValueCommand in class AbstractVisitorctx - invocation contextcommand - command to visit
Throwable - in the event of problems.
public Object visitPutForExternalReadCommand(InvocationContext ctx,
PutForExternalReadCommand command)
throws Throwable
Visitor
visitPutForExternalReadCommand in interface VisitorvisitPutForExternalReadCommand in class AbstractVisitorctx - invocation contextcommand - command to visit
Throwable - in the event of problems.
public Object visitRemoveNodeCommand(InvocationContext ctx,
RemoveNodeCommand command)
throws Throwable
Visitor
visitRemoveNodeCommand in interface VisitorvisitRemoveNodeCommand in class AbstractVisitorctx - invocation contextcommand - command to visit
Throwable - in the event of problems.
public Object visitClearDataCommand(InvocationContext ctx,
ClearDataCommand command)
throws Throwable
Visitor
visitClearDataCommand in interface VisitorvisitClearDataCommand in class AbstractVisitorctx - invocation contextcommand - command to visit
Throwable - in the event of problems.
public Object visitEvictFqnCommand(InvocationContext ctx,
EvictCommand command)
throws Throwable
Visitor
visitEvictFqnCommand in interface VisitorvisitEvictFqnCommand in class AbstractVisitorctx - invocation contextcommand - command to visit
Throwable - in the event of problems.
public Object visitInvalidateCommand(InvocationContext ctx,
InvalidateCommand command)
throws Throwable
Visitor
visitInvalidateCommand in interface VisitorvisitInvalidateCommand in class AbstractVisitorctx - invocation contextcommand - command to visit
Throwable - in the event of problems.
public Object visitRemoveKeyCommand(InvocationContext ctx,
RemoveKeyCommand command)
throws Throwable
Visitor
visitRemoveKeyCommand in interface VisitorvisitRemoveKeyCommand in class AbstractVisitorctx - invocation contextcommand - command to visit
Throwable - in the event of problems.
public Object visitGetDataMapCommand(InvocationContext ctx,
GetDataMapCommand command)
throws Throwable
Visitor
visitGetDataMapCommand in interface VisitorvisitGetDataMapCommand in class AbstractVisitorctx - invocation contextcommand - command to visit
Throwable - in the event of problems.
public Object visitExistsNodeCommand(InvocationContext ctx,
ExistsCommand command)
throws Throwable
Visitor
visitExistsNodeCommand in interface VisitorvisitExistsNodeCommand in class AbstractVisitorctx - invocation contextcommand - command to visit
Throwable - in the event of problems.
public Object visitGetKeyValueCommand(InvocationContext ctx,
GetKeyValueCommand command)
throws Throwable
Visitor
visitGetKeyValueCommand in interface VisitorvisitGetKeyValueCommand in class AbstractVisitorctx - invocation contextcommand - command to visit
Throwable - in the event of problems.
public Object visitGetNodeCommand(InvocationContext ctx,
GetNodeCommand command)
throws Throwable
Visitor
visitGetNodeCommand in interface VisitorvisitGetNodeCommand in class AbstractVisitorctx - invocation contextcommand - command to visit
Throwable - in the event of problems.
public Object visitGetKeysCommand(InvocationContext ctx,
GetKeysCommand command)
throws Throwable
Visitor
visitGetKeysCommand in interface VisitorvisitGetKeysCommand in class AbstractVisitorctx - invocation contextcommand - command to visit
Throwable - in the event of problems.
public Object visitGetChildrenNamesCommand(InvocationContext ctx,
GetChildrenNamesCommand command)
throws Throwable
Visitor
visitGetChildrenNamesCommand in interface VisitorvisitGetChildrenNamesCommand in class AbstractVisitorctx - invocation contextcommand - command to visit
Throwable - in the event of problems.
public Object visitMoveCommand(InvocationContext ctx,
MoveCommand command)
throws Throwable
Visitor
visitMoveCommand in interface VisitorvisitMoveCommand in class AbstractVisitorctx - invocation contextcommand - command to visit
Throwable - in the event of problems.
public Object visitGravitateDataCommand(InvocationContext ctx,
GravitateDataCommand command)
throws Throwable
Visitor
visitGravitateDataCommand in interface VisitorvisitGravitateDataCommand in class AbstractVisitorctx - invocation contextcommand - command to visit
Throwable - in the event of problems.
public Object visitPrepareCommand(InvocationContext ctx,
PrepareCommand command)
throws Throwable
Visitor
visitPrepareCommand in interface VisitorvisitPrepareCommand in class AbstractVisitorctx - invocation contextcommand - command to visit
Throwable - in the event of problems.
public Object visitRollbackCommand(InvocationContext ctx,
RollbackCommand command)
throws Throwable
Visitor
visitRollbackCommand in interface VisitorvisitRollbackCommand in class AbstractVisitorctx - invocation contextcommand - command to visit
Throwable - in the event of problems.
public Object visitOptimisticPrepareCommand(InvocationContext ctx,
OptimisticPrepareCommand command)
throws Throwable
Visitor
visitOptimisticPrepareCommand in interface VisitorvisitOptimisticPrepareCommand in class AbstractVisitorctx - invocation contextcommand - command to visit
Throwable - in the event of problems.
public Object visitCreateNodeCommand(InvocationContext ctx,
CreateNodeCommand command)
throws Throwable
Visitor
visitCreateNodeCommand in interface VisitorvisitCreateNodeCommand in class AbstractVisitorctx - invocation contextcommand - command to visit
Throwable - in the event of problems.public Fqn getBackupFqn(Fqn originalFqn)
public List<ReversibleCommand> transformBatch(List<ReversibleCommand> toTransform)
throws Throwable
Throwable
public static Fqn getBackupFqn(org.jgroups.Address dataOwnerAddress,
Fqn origFqn)
dataOwnerAddress - the JGroups Address of the data ownerorigFqn - the original Fqn
public static Fqn getBackupFqn(String buddyGroupName,
Fqn origFqn)
buddyGroupName - the buddy group nameorigFqn - the original Fqn
public static Fqn getBackupFqn(Fqn buddyGroupRoot,
Fqn origFqn)
buddyGroupRoot - the subtree under which data for a particular buddy is backed uporigFqn - the original Fqn
public static boolean isBackupFqn(Fqn name)
public static Fqn getActualFqn(Fqn fqn)
public static boolean isDeadBackupFqn(Fqn name)
name - fqn to test
public static Fqn<String> getBackupRoot(org.jgroups.Address dataOwner)
dataOwner - owner of a data set
public static Fqn<String> getDeadBackupRoot(org.jgroups.Address dataOwner)
dataOwner - owner of data
public static boolean isDeadBackupRoot(Fqn f)
public static String getGroupNameFromAddress(org.jgroups.Address address)
public static Fqn getBackupRootFromFqn(Fqn fqn)
fqn - fqn
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||