/** * Fetches a chunk of elements from a remote cache peer * * @param cache the cache to put elements in * @param requestChunk the chunk of keys to request * @param cachePeer the peer to fetch from * @throws java.rmi.RemoteException */ protected void fetchAndPutElements(Ehcache cache, List requestChunk, CachePeer cachePeer) throws RemoteException { List receivedChunk = cachePeer.getElements(requestChunk); for (int i = 0; i < receivedChunk.size(); i++) { Element element = (Element) receivedChunk.get(i); // element could be expired at the peer if (element != null) { cache.put(element, true); } } }
/** * Fetches a chunk of elements from a remote cache peer * * @param cache the cache to put elements in * @param requestChunk the chunk of keys to request * @param cachePeer the peer to fetch from * @throws java.rmi.RemoteException */ protected void fetchAndPutElements(Ehcache cache, List requestChunk, CachePeer cachePeer) throws RemoteException { List receivedChunk = cachePeer.getElements(requestChunk); for (int i = 0; i < receivedChunk.size(); i++) { Element element = (Element) receivedChunk.get(i); // element could be expired at the peer if (element != null) { cache.put(element, true); } } }
/** * Fetches a chunk of elements from a remote cache peer * * @param cache the cache to put elements in * @param requestChunk the chunk of keys to request * @param cachePeer the peer to fetch from * @throws java.rmi.RemoteException */ protected void fetchAndPutElements(Ehcache cache, List requestChunk, CachePeer cachePeer) throws RemoteException { List receivedChunk = cachePeer.getElements(requestChunk); for (int i = 0; i < receivedChunk.size(); i++) { Element element = (Element) receivedChunk.get(i); // element could be expired at the peer if (element != null) { cache.put(element, true); } } }
/** * Fetches a chunk of elements from a remote cache peer * * @param cache the cache to put elements in * @param requestChunk the chunk of keys to request * @param cachePeer the peer to fetch from * @throws java.rmi.RemoteException */ protected void fetchAndPutElements(Ehcache cache, List requestChunk, CachePeer cachePeer) throws RemoteException { List receivedChunk = cachePeer.getElements(requestChunk); for (int i = 0; i < receivedChunk.size(); i++) { Element element = (Element) receivedChunk.get(i); // element could be expired at the peer if (element != null) { cache.put(element, true); } } }