net.sf.ehcache.distribution
public class RMIBootstrapCacheLoader extends Object implements BootstrapCacheLoader
Version: $Id: RMIBootstrapCacheLoader.java 191 2006-09-03 22:41:48Z gregluck $
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. |
Parameters: asynchronous Whether to load asynchronously
Parameters: cache
Throws: RemoteCacheException if anything goes wrong with the remote call
Parameters: cache the cache to put elements in requestChunk the chunk of keys to request cachePeer the peer to fetch from
Throws: java.rmi.RemoteException
Returns: true if this bootstrap loader is asynchronous
Parameters: cache
Throws: RemoteCacheException if anything goes wrong with the remote call