|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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 |
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 |
visitPutKeyValueCommand(InvocationContext ctx,
PutKeyValueCommand command)
Visits a PutKeyValueCommand. |
Object |
visitRemoveDataCommand(InvocationContext ctx,
RemoveDataCommand command)
Visits a RemoveDataCommand. |
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 Visitor
visitCommitCommand
in class AbstractVisitor
ctx
- invocation contextcommitCommand
- command to visit
Throwable
- in the event of problems.public Object visitPutDataMapCommand(InvocationContext ctx, PutDataMapCommand command) throws Throwable
Visitor
visitPutDataMapCommand
in interface Visitor
visitPutDataMapCommand
in class AbstractVisitor
ctx
- invocation contextcommand
- command to visit
Throwable
- in the event of problems.public Object visitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable
Visitor
visitPutKeyValueCommand
in interface Visitor
visitPutKeyValueCommand
in class AbstractVisitor
ctx
- invocation contextcommand
- command to visit
Throwable
- in the event of problems.public Object visitRemoveNodeCommand(InvocationContext ctx, RemoveNodeCommand command) throws Throwable
Visitor
visitRemoveNodeCommand
in interface Visitor
visitRemoveNodeCommand
in class AbstractVisitor
ctx
- invocation contextcommand
- command to visit
Throwable
- in the event of problems.public Object visitRemoveDataCommand(InvocationContext ctx, RemoveDataCommand command) throws Throwable
Visitor
visitRemoveDataCommand
in interface Visitor
visitRemoveDataCommand
in class AbstractVisitor
ctx
- invocation contextcommand
- command to visit
Throwable
- in the event of problems.public Object visitEvictFqnCommand(InvocationContext ctx, EvictCommand command) throws Throwable
Visitor
visitEvictFqnCommand
in interface Visitor
visitEvictFqnCommand
in class AbstractVisitor
ctx
- invocation contextcommand
- command to visit
Throwable
- in the event of problems.public Object visitInvalidateCommand(InvocationContext ctx, InvalidateCommand command) throws Throwable
Visitor
visitInvalidateCommand
in interface Visitor
visitInvalidateCommand
in class AbstractVisitor
ctx
- invocation contextcommand
- command to visit
Throwable
- in the event of problems.public Object visitRemoveKeyCommand(InvocationContext ctx, RemoveKeyCommand command) throws Throwable
Visitor
visitRemoveKeyCommand
in interface Visitor
visitRemoveKeyCommand
in class AbstractVisitor
ctx
- invocation contextcommand
- command to visit
Throwable
- in the event of problems.public Object visitGetDataMapCommand(InvocationContext ctx, GetDataMapCommand command) throws Throwable
Visitor
visitGetDataMapCommand
in interface Visitor
visitGetDataMapCommand
in class AbstractVisitor
ctx
- invocation contextcommand
- command to visit
Throwable
- in the event of problems.public Object visitExistsNodeCommand(InvocationContext ctx, ExistsCommand command) throws Throwable
Visitor
visitExistsNodeCommand
in interface Visitor
visitExistsNodeCommand
in class AbstractVisitor
ctx
- invocation contextcommand
- command to visit
Throwable
- in the event of problems.public Object visitGetKeyValueCommand(InvocationContext ctx, GetKeyValueCommand command) throws Throwable
Visitor
visitGetKeyValueCommand
in interface Visitor
visitGetKeyValueCommand
in class AbstractVisitor
ctx
- invocation contextcommand
- command to visit
Throwable
- in the event of problems.public Object visitGetNodeCommand(InvocationContext ctx, GetNodeCommand command) throws Throwable
Visitor
visitGetNodeCommand
in interface Visitor
visitGetNodeCommand
in class AbstractVisitor
ctx
- invocation contextcommand
- command to visit
Throwable
- in the event of problems.public Object visitGetKeysCommand(InvocationContext ctx, GetKeysCommand command) throws Throwable
Visitor
visitGetKeysCommand
in interface Visitor
visitGetKeysCommand
in class AbstractVisitor
ctx
- invocation contextcommand
- command to visit
Throwable
- in the event of problems.public Object visitGetChildrenNamesCommand(InvocationContext ctx, GetChildrenNamesCommand command) throws Throwable
Visitor
visitGetChildrenNamesCommand
in interface Visitor
visitGetChildrenNamesCommand
in class AbstractVisitor
ctx
- invocation contextcommand
- command to visit
Throwable
- in the event of problems.public Object visitMoveCommand(InvocationContext ctx, MoveCommand command) throws Throwable
Visitor
visitMoveCommand
in interface Visitor
visitMoveCommand
in class AbstractVisitor
ctx
- invocation contextcommand
- command to visit
Throwable
- in the event of problems.public Object visitGravitateDataCommand(InvocationContext ctx, GravitateDataCommand command) throws Throwable
Visitor
visitGravitateDataCommand
in interface Visitor
visitGravitateDataCommand
in class AbstractVisitor
ctx
- invocation contextcommand
- command to visit
Throwable
- in the event of problems.public Object visitPrepareCommand(InvocationContext ctx, PrepareCommand command) throws Throwable
Visitor
visitPrepareCommand
in interface Visitor
visitPrepareCommand
in class AbstractVisitor
ctx
- invocation contextcommand
- command to visit
Throwable
- in the event of problems.public Object visitRollbackCommand(InvocationContext ctx, RollbackCommand command) throws Throwable
Visitor
visitRollbackCommand
in interface Visitor
visitRollbackCommand
in class AbstractVisitor
ctx
- invocation contextcommand
- command to visit
Throwable
- in the event of problems.public Object visitOptimisticPrepareCommand(InvocationContext ctx, OptimisticPrepareCommand command) throws Throwable
Visitor
visitOptimisticPrepareCommand
in interface Visitor
visitOptimisticPrepareCommand
in class AbstractVisitor
ctx
- invocation contextcommand
- command to visit
Throwable
- in the event of problems.public Object visitCreateNodeCommand(InvocationContext ctx, CreateNodeCommand command) throws Throwable
Visitor
visitCreateNodeCommand
in interface Visitor
visitCreateNodeCommand
in class AbstractVisitor
ctx
- 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 |