org.jboss.cache.buddyreplication
Class NextMemberBuddyLocator
java.lang.Object
org.jboss.cache.buddyreplication.NextMemberBuddyLocator
- All Implemented Interfaces:
- BuddyLocator
public class NextMemberBuddyLocator
- extends java.lang.Object
- implements BuddyLocator
This buddy locator uses a next-in-line algorithm to select buddies for a buddy group. This algorithm
allows for the following properties, all of which are optional.
- More than one buddy per group - the numBuddies property, defaulting to 1 if ommitted.
- Ability to skip buddies on the same host when selecting buddies - the ignoreColocatedBuddies
property, defaulting to true if ommitted. Note that this is just a hint though, and if all nstances in
a cluster are colocated, the algorithm will be forced to pick a colocated instance even if this is property
set to true.
- Author:
- Manik Surtani (manik@jboss.org)
Method Summary |
void |
init(java.util.Properties props)
|
java.util.List |
locateBuddies(java.util.Map buddyPoolMap,
java.util.List currentMembership,
org.jgroups.stack.IpAddress dataOwner)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NextMemberBuddyLocator
public NextMemberBuddyLocator()
init
public void init(java.util.Properties props)
- Specified by:
init
in interface BuddyLocator
locateBuddies
public java.util.List locateBuddies(java.util.Map buddyPoolMap,
java.util.List currentMembership,
org.jgroups.stack.IpAddress dataOwner)
- Specified by:
locateBuddies
in interface BuddyLocator
Copyright © 1998-2005 JBoss Inc . All Rights Reserved.