/** * Clones this loader */ @Override public Object clone() throws CloneNotSupportedException { //checkstyle return new RMIBootstrapCacheLoader(asynchronous, maximumChunkSizeBytes); }
List cachePeers = acquireCachePeers(cache); if (cachePeers == null || cachePeers.size() == 0) { LOG.debug("Empty list of cache peers for cache " + cache.getName() + ". No cache peer to bootstrap from."); requestChunk.add(serializable); if (requestChunk.size() == chunkSize) { fetchAndPutElements(cache, requestChunk, cachePeer); requestChunk.clear(); fetchAndPutElements(cache, requestChunk, cachePeer); LOG.debug("Bootstrap of " + cache.getName() + " from " + cachePeer + " finished. " + keys.size() + " keys requested.");
/** * RemoteDebugger thread method. */ public final void run() { try { doLoad(cache); } catch (RemoteCacheException e) { LOG.warn("Error asynchronously performing bootstrap. The cause was: " + e.getMessage(), e); } finally { cache = null; } }
cachePeers = listRemoteCachePeers(cache); if (cachePeers == null) { break;
cachePeers = listRemoteCachePeers(cache); if (cachePeers == null) { break;
List cachePeers = acquireCachePeers(cache); if (cachePeers == null || cachePeers.size() == 0) { LOG.debug("Empty list of cache peers for cache " + cache.getName() + ". No cache peer to bootstrap from."); requestChunk.add(serializable); if (requestChunk.size() == chunkSize) { fetchAndPutElements(cache, requestChunk, cachePeer); requestChunk.clear(); fetchAndPutElements(cache, requestChunk, cachePeer); LOG.debug("Bootstrap of " + cache.getName() + " from " + cachePeer + " finished. " + keys.size() + " keys requested.");
/** * Create a <code>BootstrapCacheLoader</code> * * @param properties implementation specific properties. These are configured as comma * separated name value pairs in ehcache.xml * @return a constructed BootstrapCacheLoader */ public RMIBootstrapCacheLoader createBootstrapCacheLoader(Properties properties) { boolean bootstrapAsynchronously = extractBootstrapAsynchronously(properties); int maximumChunkSizeBytes = extractMaximumChunkSizeBytes(properties); return new RMIBootstrapCacheLoader(bootstrapAsynchronously, maximumChunkSizeBytes); }
/** * 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 */ public void load(Ehcache cache) throws RemoteCacheException { if (asynchronous) { BootstrapThread bootstrapThread = new BootstrapThread(cache); bootstrapThread.start(); } else { doLoad(cache); } }
cachePeers = listRemoteCachePeers(cache); if (cachePeers == null) { break;
List cachePeers = acquireCachePeers(cache); if (cachePeers == null || cachePeers.size() == 0) { LOG.debug("Empty list of cache peers for cache " + cache.getName() + ". No cache peer to bootstrap from."); requestChunk.add(serializable); if (requestChunk.size() == chunkSize) { fetchAndPutElements(cache, requestChunk, cachePeer); requestChunk.clear(); fetchAndPutElements(cache, requestChunk, cachePeer); LOG.debug("Bootstrap of " + cache.getName() + " from " + cachePeer + " finished. " + keys.size() + " keys requested.");
/** * Clones this loader */ @Override public Object clone() throws CloneNotSupportedException { //checkstyle return new RMIBootstrapCacheLoader(asynchronous, maximumChunkSizeBytes); }
/** * RemoteDebugger thread method. */ public final void run() { try { doLoad(cache); } catch (RemoteCacheException e) { LOG.warn("Error asynchronously performing bootstrap. The cause was: " + e.getMessage(), e); } finally { cache = null; } }
cachePeers = listRemoteCachePeers(cache); if (cachePeers == null) { break;
List cachePeers = acquireCachePeers(cache); if (cachePeers == null || cachePeers.size() == 0) { LOG.debug("Empty list of cache peers for cache " + cache.getName() + ". No cache peer to bootstrap from."); requestChunk.add(serializable); if (requestChunk.size() == chunkSize) { fetchAndPutElements(cache, requestChunk, cachePeer); requestChunk.clear(); fetchAndPutElements(cache, requestChunk, cachePeer); LOG.debug("Bootstrap of " + cache.getName() + " from " + cachePeer + " finished. " + keys.size() + " keys requested.");
/** * Clones this loader */ @Override public Object clone() throws CloneNotSupportedException { //checkstyle return new RMIBootstrapCacheLoader(asynchronous, maximumChunkSizeBytes); }
/** * RemoteDebugger thread method. */ public final void run() { try { doLoad(cache); } catch (RemoteCacheException e) { LOG.warn("Error asynchronously performing bootstrap. The cause was: " + e.getMessage(), e); } finally { cache = null; } }
/** * Clones this loader */ @Override public Object clone() throws CloneNotSupportedException { //checkstyle return new RMIBootstrapCacheLoader(asynchronous, maximumChunkSizeBytes); }
/** * RemoteDebugger thread method. */ public final void run() { try { doLoad(cache); } catch (RemoteCacheException e) { LOG.warn("Error asynchronously performing bootstrap. The cause was: " + e.getMessage(), e); } finally { cache = null; } }
/** * Create a <code>BootstrapCacheLoader</code> * * @param properties implementation specific properties. These are configured as comma * separated name value pairs in ehcache.xml * @return a constructed BootstrapCacheLoader */ public RMIBootstrapCacheLoader createBootstrapCacheLoader(Properties properties) { boolean bootstrapAsynchronously = extractBootstrapAsynchronously(properties); int maximumChunkSizeBytes = extractMaximumChunkSizeBytes(properties); return new RMIBootstrapCacheLoader(bootstrapAsynchronously, maximumChunkSizeBytes); }
/** * 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 */ public void load(Ehcache cache) throws RemoteCacheException { if (asynchronous) { BootstrapThread bootstrapThread = new BootstrapThread(cache); bootstrapThread.start(); } else { doLoad(cache); } }