| |
|
| java.lang.Object net.sf.ehcache.distribution.RMIBootstrapCacheLoader
RMIBootstrapCacheLoader | public class RMIBootstrapCacheLoader implements BootstrapCacheLoader(Code) | | Loads Elements from a random Cache Peer
author: Greg Luck version: $Id: RMIBootstrapCacheLoader.java 568 2007-12-18 10:39:07Z gregluck $ |
Field Summary | |
protected boolean | asynchronous | protected int | maximumChunkSizeBytes The maximum serialized size of the elements to request from a remote cache peer during bootstrap. |
asynchronous | protected boolean asynchronous(Code) | | Whether to load asynchronously
|
maximumChunkSizeBytes | protected int maximumChunkSizeBytes(Code) | | The maximum serialized size of the elements to request from a remote cache peer during bootstrap.
|
RMIBootstrapCacheLoader | public RMIBootstrapCacheLoader(boolean asynchronous, int maximumChunkSize)(Code) | | Creates a boostrap cache loader that will work with RMI based distribution
Parameters: asynchronous - Whether to load asynchronously |
acquireCachePeers | protected List acquireCachePeers(Ehcache cache)(Code) | | Acquires the cache peers for this cache.
Parameters: cache - |
doLoad | public void doLoad(Ehcache cache) throws RemoteCacheException(Code) | | Bootstraps the cache from a random CachePeer. Requests are done in chunks estimated at 5MB Serializable
size. This balances memory use on each end and network performance.
Bootstrapping requires the establishment of a cluster. This can be instantaneous for manually configued
clusters or may take a number of seconds for multicast ones. This method waits up to 11 seconds for a cluster
to form.
throws: RemoteCacheException - if anything goes wrong with the remote call |
fetchAndPutElements | protected void fetchAndPutElements(Ehcache cache, List requestChunk, CachePeer cachePeer) throws RemoteException(Code) | | Fetches a chunk of elements from a remote cache peer
Parameters: cache - the cache to put elements in Parameters: requestChunk - the chunk of keys to request Parameters: cachePeer - the peer to fetch from throws: java.rmi.RemoteException - |
getMaximumChunkSizeBytes | public int getMaximumChunkSizeBytes()(Code) | | Gets the maximum chunk size
|
isAsynchronous | public boolean isAsynchronous()(Code) | | true if this bootstrap loader is asynchronous |
listRemoteCachePeers | protected List listRemoteCachePeers(Ehcache cache)(Code) | | Package protected List of cache peers
Parameters: cache - |
load | public void load(Ehcache cache) throws RemoteCacheException(Code) | | Bootstraps the cache from a random CachePeer. Requests are done in chunks estimated at 5MB Serializable
size. This balances memory use on each end and network performance.
throws: RemoteCacheException - if anything goes wrong with the remote call |
|
|
|