|
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 List |
acquireCachePeers(Ehcache cache)
Acquires the cache peers for this cache. |
Object |
clone()
Clones this loader |
void |
doLoad(Ehcache cache)
Bootstraps the cache from a random CachePeer. |
protected void |
fetchAndPutElements(Ehcache cache,
List requestChunk,
CachePeer cachePeer)
Fetches a chunk of elements from a remote cache peer |
int |
getMaximumChunkSizeBytes()
Gets the maximum chunk size |
boolean |
isAsynchronous()
|
protected 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 List acquireCachePeers(Ehcache cache)
cache
- protected void fetchAndPutElements(Ehcache cache, List requestChunk, CachePeer cachePeer) throws RemoteException
cache
- the cache to put elements inrequestChunk
- the chunk of keys to requestcachePeer
- the peer to fetch from
RemoteException
protected List listRemoteCachePeers(Ehcache cache)
cache
- public int getMaximumChunkSizeBytes()
public Object clone() throws CloneNotSupportedException
clone
in interface BootstrapCacheLoader
clone
in class Object
CloneNotSupportedException
|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |