|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.ehcache.distribution.jgroups.JGroupsCacheManagerPeerProvider
public class JGroupsCacheManagerPeerProvider
The main Jgroup class for replication via JGroup. Starts up the Jgroup communication bus and listen for message in the bus. Because of Ehcache design we have to register this as a CachePeer. In reality this class listen for change on the bus and tells the cachemanager to update.
| Field Summary | |
|---|---|
static String |
SCHEME_NAME
Constant that defines the value returned by getScheme() |
| Constructor Summary | |
|---|---|
JGroupsCacheManagerPeerProvider(net.sf.ehcache.CacheManager cacheManager,
String properties)
Construct a new JGroupsCacheManagerPeerProvider with a specific JGroups connection String |
|
JGroupsCacheManagerPeerProvider(net.sf.ehcache.CacheManager cacheManager,
URL configUrl)
Construct a new JGroupsCacheManagerPeerProvider with a specific JGroups connection String |
|
| Method Summary | |
|---|---|
void |
dispose()
|
JGroupsBootstrapManager |
getBootstrapManager()
|
static JGroupsCacheManagerPeerProvider |
getCachePeerProvider(net.sf.ehcache.CacheManager cacheManager)
Given an CacheManager get the corresponding instance of this class. |
static JGroupsCacheManagerPeerProvider |
getCachePeerProvider(net.sf.ehcache.Ehcache cache)
Given an Ehcache get the corresponding instance of this class. |
org.jgroups.JChannel |
getChannel()
|
String |
getClusterName()
|
String |
getScheme()
The replication scheme. |
net.sf.ehcache.Status |
getStatus()
|
long |
getTimeForClusterToForm()
JGroups will be connected once init() returns and there is no per-cache connect time to worry about. |
void |
init()
|
List<net.sf.ehcache.distribution.CachePeer> |
listRemoteCachePeers(net.sf.ehcache.Ehcache cache)
|
void |
register(MBeanServer mBeanServer)
|
void |
registerPeer(String rmiUrl)
|
void |
setChannelName(String channelName)
Set the name of the JChannel, if null the cache manager name is used. |
void |
unregisterPeer(String rmiUrl)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String SCHEME_NAME
getScheme()
| Constructor Detail |
|---|
public JGroupsCacheManagerPeerProvider(net.sf.ehcache.CacheManager cacheManager,
String properties)
cacheManager - the cache managerproperties - the JGroups connection String
public JGroupsCacheManagerPeerProvider(net.sf.ehcache.CacheManager cacheManager,
URL configUrl)
cacheManager - the cache managerconfigUrl - the JGroups configuration file| Method Detail |
|---|
public void setChannelName(String channelName)
public static JGroupsCacheManagerPeerProvider getCachePeerProvider(net.sf.ehcache.Ehcache cache)
Ehcache get the corresponding instance of this class.
public static JGroupsCacheManagerPeerProvider getCachePeerProvider(net.sf.ehcache.CacheManager cacheManager)
CacheManager get the corresponding instance of this class.
public void init()
init in interface net.sf.ehcache.distribution.CacheManagerPeerProviderpublic void register(MBeanServer mBeanServer)
register in interface net.sf.ehcache.management.ManagedCacheManagerPeerProvider
public void dispose()
throws net.sf.ehcache.CacheException
dispose in interface net.sf.ehcache.distribution.CacheManagerPeerProvidernet.sf.ehcache.CacheExceptionpublic long getTimeForClusterToForm()
init() returns and there is no per-cache connect time to worry about.
getTimeForClusterToForm in interface net.sf.ehcache.distribution.CacheManagerPeerProviderpublic String getScheme()
CacheReplicator should lookup the provider for its scheme
type during replication. Similarly a BootstrapCacheLoader should also look up the provider for its
scheme.
getScheme in interface net.sf.ehcache.distribution.CacheManagerPeerProvider
public List<net.sf.ehcache.distribution.CachePeer> listRemoteCachePeers(net.sf.ehcache.Ehcache cache)
throws net.sf.ehcache.CacheException
listRemoteCachePeers in interface net.sf.ehcache.distribution.CacheManagerPeerProvidernet.sf.ehcache.CacheExceptionpublic void registerPeer(String rmiUrl)
registerPeer in interface net.sf.ehcache.distribution.CacheManagerPeerProviderpublic void unregisterPeer(String rmiUrl)
unregisterPeer in interface net.sf.ehcache.distribution.CacheManagerPeerProviderpublic org.jgroups.JChannel getChannel()
public JGroupsBootstrapManager getBootstrapManager()
public net.sf.ehcache.Status getStatus()
Status of the managerpublic String getClusterName()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||