public class BuddyManager extends Object
Modifier and Type | Class and Description |
---|---|
class |
BuddyManager.ViewChangeListener |
Modifier and Type | Field and Description |
---|---|
static String |
BUDDY_BACKUP_SUBTREE
Constants representng the buddy backup subtree
|
static Fqn |
BUDDY_BACKUP_SUBTREE_FQN |
Constructor and Description |
---|
BuddyManager() |
BuddyManager(BuddyReplicationConfig config) |
Modifier and Type | Method and Description |
---|---|
protected BuddyLocator |
createBuddyLocator(BuddyReplicationConfig.BuddyLocatorConfig config) |
protected BuddyLocator |
createDefaultBuddyLocator() |
List<org.jgroups.Address> |
getBackupDataOwners()
Returns a List
|
List<org.jgroups.Address> |
getBuddyAddresses()
Returns a list of buddies for which this instance is Data Owner.
|
Vector<org.jgroups.Address> |
getBuddyAddressesAsVector()
Created as an optimisation for JGroups, which uses vectors.
|
int |
getBuddyCommunicationTimeout() |
String |
getBuddyGroup() |
String |
getBuddyGroupsIParticipateIn() |
String |
getBuddyPoolName() |
BuddyReplicationConfig |
getConfig() |
List<org.jgroups.Address> |
getMembersOutsideBuddyGroup() |
List<Fqn<?>> |
getNewlyDeadBackupFqns(Fqn<?> backupFqn) |
void |
handleAssignToBuddyGroup(BuddyGroup newGroup,
Map<Fqn,byte[]> state)
Called by
AssignToBuddyGroupCommand thic command is received from a remote cache. |
void |
handlePoolNameBroadcast(org.jgroups.Address address,
String poolName)
Called by CacheImpl._remoteAnnounceBuddyPoolName(Address address, String buddyPoolName)
when a view change occurs and caches need to inform the cluster of which buddy pool it is in.
|
void |
handleRemoveFromBuddyGroup(String groupName)
Called by CacheImpl._remoteRemoveFromBuddyGroup(String groupName)
when a method call for this is received from a remote cache.
|
void |
init() |
void |
injectDependencies(CacheSPI cache,
Configuration configuration,
RegionManager regionManager,
StateTransferManager stateTransferManager,
RPCManager rpcManager,
Notifier notifier,
CommandsFactory factory,
DataContainer dataContainer,
BuddyFqnTransformer transformer) |
boolean |
isAutoDataGravitation() |
boolean |
isDataGravitationRemoveOnFind() |
boolean |
isDataGravitationSearchBackupTrees() |
boolean |
isEnabled() |
void |
stop()
Stops the buddy manager and the related async thread.
|
VisitableCommand |
transformFqns(VisitableCommand call) |
ReplicateCommand |
transformReplicateCommand(ReplicateCommand rc) |
public static final String BUDDY_BACKUP_SUBTREE
public static final Fqn BUDDY_BACKUP_SUBTREE_FQN
public BuddyManager()
public BuddyManager(BuddyReplicationConfig config)
public void injectDependencies(CacheSPI cache, Configuration configuration, RegionManager regionManager, StateTransferManager stateTransferManager, RPCManager rpcManager, Notifier notifier, CommandsFactory factory, DataContainer dataContainer, BuddyFqnTransformer transformer)
public BuddyReplicationConfig getConfig()
protected BuddyLocator createBuddyLocator(BuddyReplicationConfig.BuddyLocatorConfig config) throws ClassNotFoundException, IllegalAccessException, InstantiationException
protected BuddyLocator createDefaultBuddyLocator()
public boolean isEnabled()
public String getBuddyPoolName()
public void stop()
public void init() throws CacheException
CacheException
public boolean isAutoDataGravitation()
public boolean isDataGravitationRemoveOnFind()
public boolean isDataGravitationSearchBackupTrees()
public int getBuddyCommunicationTimeout()
public void handlePoolNameBroadcast(org.jgroups.Address address, String poolName)
public void handleRemoveFromBuddyGroup(String groupName) throws BuddyNotInitException
BuddyNotInitException
public void handleAssignToBuddyGroup(BuddyGroup newGroup, Map<Fqn,byte[]> state) throws Exception
AssignToBuddyGroupCommand
thic command is received from a remote cache.newGroup
- the buddy groupstate
- Mapnull
.Exception
public List<org.jgroups.Address> getBackupDataOwners()
public List<org.jgroups.Address> getBuddyAddresses()
public Vector<org.jgroups.Address> getBuddyAddressesAsVector()
public List<org.jgroups.Address> getMembersOutsideBuddyGroup()
public VisitableCommand transformFqns(VisitableCommand call)
Fqn2BuddyFqnVisitor
public ReplicateCommand transformReplicateCommand(ReplicateCommand rc)
public String getBuddyGroup()
public String getBuddyGroupsIParticipateIn()
Copyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.