|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.ehcache.distribution.RMIBootstrapCacheLoader
public class RMIBootstrapCacheLoader
Loads Elements from a random Cache Peer
Field Summary | |
---|---|
protected boolean |
asynchronous
Whether to load asynchronously |
protected int |
maximumChunkSizeBytes
The maximum serialized size of the elements to request from a remote cache peer during bootstrap. |
Constructor Summary | |
---|---|
RMIBootstrapCacheLoader(boolean asynchronous,
int maximumChunkSize)
Creates a boostrap cache loader that will work with RMI based distribution |
Method Summary | |
---|---|
protected java.util.List |
acquireCachePeers(Ehcache cache)
Acquires the cache peers for this cache. |
java.lang.Object |
clone()
Clones this loader |
void |
doLoad(Ehcache cache)
Bootstraps the cache from a random CachePeer. |
protected void |
fetchAndPutElements(Ehcache cache,
java.util.List requestChunk,
CachePeer cachePeer)
Fetches a chunk of elements from a remote cache peer |
int |
getMaximumChunkSizeBytes()
Gets the maximum chunk size |
boolean |
isAsynchronous()
|
protected java.util.List |
listRemoteCachePeers(Ehcache cache)
Package protected List of cache peers |
void |
load(Ehcache cache)
Bootstraps the cache from a random CachePeer. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected boolean asynchronous
protected int maximumChunkSizeBytes
Constructor Detail |
---|
public RMIBootstrapCacheLoader(boolean asynchronous, int maximumChunkSize)
asynchronous
- Whether to load asynchronouslyMethod Detail |
---|
public void load(Ehcache cache) throws RemoteCacheException
load
in interface BootstrapCacheLoader
RemoteCacheException
- if anything goes wrong with the remote callpublic boolean isAsynchronous()
isAsynchronous
in interface BootstrapCacheLoader
public void doLoad(Ehcache cache) throws RemoteCacheException
RemoteCacheException
- if anything goes wrong with the remote callprotected java.util.List acquireCachePeers(Ehcache cache)
cache
- protected void fetchAndPutElements(Ehcache cache, java.util.List requestChunk, CachePeer cachePeer) throws java.rmi.RemoteException
cache
- the cache to put elements inrequestChunk
- the chunk of keys to requestcachePeer
- the peer to fetch from
java.rmi.RemoteException
protected java.util.List listRemoteCachePeers(Ehcache cache)
cache
- public int getMaximumChunkSizeBytes()
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in interface BootstrapCacheLoader
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |