public class JGroupsCacheManagerPeerProvider
extends java.lang.Object
implements com.fr.third.net.sf.ehcache.management.ManagedCacheManagerPeerProvider
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.
限定符和类型 | 字段和说明 |
---|---|
static java.lang.String |
SCHEME_NAME
Constant that defines the value returned by
getScheme() |
构造器和说明 |
---|
JGroupsCacheManagerPeerProvider(com.fr.third.net.sf.ehcache.CacheManager cacheManager,
ProtocolStackType stackType)
定制的构造方法,接受CacheManager和ProtocolStackType
|
JGroupsCacheManagerPeerProvider(com.fr.third.net.sf.ehcache.CacheManager cacheManager,
java.lang.String properties)
Construct a new JGroupsCacheManagerPeerProvider with a specific JGroups connection String
|
JGroupsCacheManagerPeerProvider(com.fr.third.net.sf.ehcache.CacheManager cacheManager,
java.net.URL configUrl)
Construct a new JGroupsCacheManagerPeerProvider with a specific JGroups connection String
|
限定符和类型 | 方法和说明 |
---|---|
void |
dispose() |
BootstrapManagerProvider |
getBootstrapManager() |
JGroupsCacheManagerEventHandler |
getCacheManagerEventHandler() |
JGroupsCachePeer |
getCachePeer() |
static JGroupsCacheManagerPeerProvider |
getCachePeerProvider(com.fr.third.net.sf.ehcache.CacheManager cacheManager)
Given an
CacheManager get the corresponding instance of this class. |
static JGroupsCacheManagerPeerProvider |
getCachePeerProvider(com.fr.third.net.sf.ehcache.Ehcache cache)
Given an
Ehcache get the corresponding instance of this class. |
java.lang.String |
getClusterName() |
java.lang.String |
getScheme()
The replication scheme.
|
com.fr.third.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() |
java.util.List<com.fr.third.net.sf.ehcache.distribution.CachePeer> |
listRemoteCachePeers(com.fr.third.net.sf.ehcache.Ehcache cache) |
void |
register(javax.management.MBeanServer mBeanServer) |
void |
registerPeer(java.lang.String rmiUrl) |
void |
setChannelName(java.lang.String channelName)
Set the name of the JChannel, if null the cache manager name is used.
|
void |
unregisterPeer(java.lang.String rmiUrl) |
public static final java.lang.String SCHEME_NAME
getScheme()
public JGroupsCacheManagerPeerProvider(com.fr.third.net.sf.ehcache.CacheManager cacheManager, java.lang.String properties)
cacheManager
- the cache managerproperties
- the JGroups connection Stringpublic JGroupsCacheManagerPeerProvider(com.fr.third.net.sf.ehcache.CacheManager cacheManager, java.net.URL configUrl)
cacheManager
- the cache managerconfigUrl
- the JGroups configuration filepublic JGroupsCacheManagerPeerProvider(com.fr.third.net.sf.ehcache.CacheManager cacheManager, ProtocolStackType stackType)
cacheManager
- stackType
- public void setChannelName(java.lang.String channelName)
public static JGroupsCacheManagerPeerProvider getCachePeerProvider(com.fr.third.net.sf.ehcache.Ehcache cache)
Ehcache
get the corresponding instance of this class.public static JGroupsCacheManagerPeerProvider getCachePeerProvider(com.fr.third.net.sf.ehcache.CacheManager cacheManager)
CacheManager
get the corresponding instance of this class.public JGroupsCacheManagerEventHandler getCacheManagerEventHandler()
public void init()
init
在接口中 com.fr.third.net.sf.ehcache.distribution.CacheManagerPeerProvider
public void register(javax.management.MBeanServer mBeanServer)
register
在接口中 com.fr.third.net.sf.ehcache.management.ManagedCacheManagerPeerProvider
public void dispose() throws com.fr.third.net.sf.ehcache.CacheException
dispose
在接口中 com.fr.third.net.sf.ehcache.distribution.CacheManagerPeerProvider
com.fr.third.net.sf.ehcache.CacheException
public long getTimeForClusterToForm()
init()
returns and there is no per-cache connect time to worry about.getTimeForClusterToForm
在接口中 com.fr.third.net.sf.ehcache.distribution.CacheManagerPeerProvider
public java.lang.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
在接口中 com.fr.third.net.sf.ehcache.distribution.CacheManagerPeerProvider
public java.util.List<com.fr.third.net.sf.ehcache.distribution.CachePeer> listRemoteCachePeers(com.fr.third.net.sf.ehcache.Ehcache cache) throws com.fr.third.net.sf.ehcache.CacheException
listRemoteCachePeers
在接口中 com.fr.third.net.sf.ehcache.distribution.CacheManagerPeerProvider
com.fr.third.net.sf.ehcache.CacheException
public void registerPeer(java.lang.String rmiUrl)
registerPeer
在接口中 com.fr.third.net.sf.ehcache.distribution.CacheManagerPeerProvider
public void unregisterPeer(java.lang.String rmiUrl)
unregisterPeer
在接口中 com.fr.third.net.sf.ehcache.distribution.CacheManagerPeerProvider
public BootstrapManagerProvider getBootstrapManager()
public com.fr.third.net.sf.ehcache.Status getStatus()
Status
of the managerpublic JGroupsCachePeer getCachePeer()
public java.lang.String getClusterName()