/** * Remove the objects of the given class from the cache. */ public void removeAll(Class cls, boolean subClasses) { removeAllInternal(cls, subClasses); }
/** * Remove the objects of the given class from the cache. */ public void removeAll(Class<?> cls, boolean subClasses) { removeAllInternal(cls, subClasses); }
/** * Remove the objects of the given class from the cache. */ public void removeAll(Class<?> cls, boolean subClasses) { removeAllInternal(cls, subClasses); }
/** * Remove the objects of the given class from the cache. */ public void removeAll(Class<?> cls, boolean subClasses) { removeAllInternal(cls, subClasses); }
/** * Remove the objects of the given class from the cache. */ public void removeAll(Class<?> cls, boolean subClasses) { removeAllInternal(cls, subClasses); }
/** * Remove all objects of the given class names from the cache. */ protected void removeAllTypeNamesInternal(Collection classNames) { Collection classes = Caches.addTypesByName(conf, classNames, null); if (classes == null) return; Class cls; for (Iterator iter = classes.iterator(); iter.hasNext();) { cls = (Class) iter.next(); if (log.isTraceEnabled()) log.trace(s_loc.get("cache-removeclass", cls.getName())); removeAllInternal(cls, false); } }
public void commit(Collection additions, Collection newUpdates, Collection existingUpdates, Collection deletes) { // remove all objects in deletes list removeAllInternal(deletes); // next, add all the new additions putAllInternal(additions); putAllInternal(newUpdates); // possibly add the existing updates, depending on the // semantics of the cache, as dictated by recacheUpdates() if (recacheUpdates()) putAllInternal(existingUpdates); if (log.isTraceEnabled()) { Collection addIds = new ArrayList(additions.size()); Collection upIds = new ArrayList(newUpdates.size()); Collection exIds = new ArrayList(existingUpdates.size()); for (Iterator iter = additions.iterator(); iter.hasNext();) addIds.add(((DataCachePCData) iter.next()).getId()); for (Iterator iter = newUpdates.iterator(); iter.hasNext();) upIds.add(((DataCachePCData) iter.next()).getId()); for (Iterator iter = existingUpdates.iterator(); iter.hasNext();) exIds.add(((DataCachePCData) iter.next()).getId()); log.trace(s_loc.get("cache-commit", new Object[]{ addIds, upIds, exIds, deletes })); } }
/** * Remove all objects of the given class names from the cache. */ protected void removeAllTypeNamesInternal(Collection<String> classNames) { Collection<Class<?>> classes = Caches.addTypesByName(conf, classNames, null); if (classes == null) return; for (Class<?> cls : classes) { if (log.isTraceEnabled()) log.trace(s_loc.get("cache-removeclass", cls.getName())); removeAllInternal(cls, false); } }
/** * Remove all objects of the given class names from the cache. */ protected void removeAllTypeNamesInternal(Collection<String> classNames) { Collection<Class<?>> classes = Caches.addTypesByName(conf, classNames, null); if (classes == null) return; for (Class<?> cls : classes) { if (log.isTraceEnabled()) log.trace(s_loc.get("cache-removeclass", cls.getName())); removeAllInternal(cls, false); } }
/** * Remove all objects of the given class names from the cache. */ protected void removeAllTypeNamesInternal(Collection<String> classNames) { Collection<Class<?>> classes = Caches.addTypesByName(conf, classNames, null); if (classes == null) return; for (Class<?> cls : classes) { if (log.isTraceEnabled()) log.trace(s_loc.get("cache-removeclass", cls.getName())); removeAllInternal(cls, false); } }
/** * Remove all objects of the given class names from the cache. */ protected void removeAllTypeNamesInternal(Collection<String> classNames) { Collection<Class<?>> classes = Caches.addTypesByName(conf, classNames, null); if (classes == null) return; for (Class<?> cls : classes) { if (log.isTraceEnabled()) log.trace(s_loc.get("cache-removeclass", cls.getName())); removeAllInternal(cls, false); } }
public void commit(Collection<DataCachePCData> additions, Collection<DataCachePCData> newUpdates, Collection<DataCachePCData> existingUpdates, Collection<Object> deletes) { // remove all objects in deletes list removeAllInternal(deletes); // next, add all the new additions putAllInternal(additions); putAllInternal(newUpdates); // possibly add the existing updates, depending on the // semantics of the cache, as dictated by recacheUpdates() if (recacheUpdates()) putAllInternal(existingUpdates); if (log.isTraceEnabled()) { Collection<Object> addIds = new ArrayList<Object>(additions.size()); Collection<Object> upIds = new ArrayList<Object>(newUpdates.size()); Collection<Object> exIds = new ArrayList<Object>(existingUpdates.size()); for (DataCachePCData addition : additions) addIds.add(addition.getId()); for (DataCachePCData newUpdate : newUpdates) upIds.add(newUpdate.getId()); for (DataCachePCData existingUpdate : existingUpdates) exIds.add(existingUpdate.getId()); log.trace(s_loc.get("cache-commit", new Object[]{ addIds, upIds, exIds, deletes })); } }
public void commit(Collection<DataCachePCData> additions, Collection<DataCachePCData> newUpdates, Collection<DataCachePCData> existingUpdates, Collection<Object> deletes) { // remove all objects in deletes list removeAllInternal(deletes); // next, add all the new additions putAllInternal(additions); putAllInternal(newUpdates); // possibly add the existing updates, depending on the // semantics of the cache, as dictated by recacheUpdates() if (recacheUpdates()) putAllInternal(existingUpdates); if (log.isTraceEnabled()) { Collection<Object> addIds = new ArrayList<Object>(additions.size()); Collection<Object> upIds = new ArrayList<Object>(newUpdates.size()); Collection<Object> exIds = new ArrayList<Object>(existingUpdates.size()); for (DataCachePCData addition : additions) addIds.add(addition.getId()); for (DataCachePCData newUpdate : newUpdates) upIds.add(newUpdate.getId()); for (DataCachePCData existingUpdate : existingUpdates) exIds.add(existingUpdate.getId()); log.trace(s_loc.get("cache-commit", new Object[]{ addIds, upIds, exIds, deletes })); } }
public void commit(Collection<DataCachePCData> additions, Collection<DataCachePCData> newUpdates, Collection<DataCachePCData> existingUpdates, Collection<Object> deletes) { // remove all objects in deletes list removeAllInternal(deletes); // next, add all the new additions putAllInternal(additions); putAllInternal(newUpdates); // possibly add the existing updates, depending on the // semantics of the cache, as dictated by recacheUpdates() if (recacheUpdates()) putAllInternal(existingUpdates); if (log.isTraceEnabled()) { Collection<Object> addIds = new ArrayList<Object>(additions.size()); Collection<Object> upIds = new ArrayList<Object>(newUpdates.size()); Collection<Object> exIds = new ArrayList<Object>(existingUpdates.size()); for (DataCachePCData addition : additions) addIds.add(addition.getId()); for (DataCachePCData newUpdate : newUpdates) upIds.add(newUpdate.getId()); for (DataCachePCData existingUpdate : existingUpdates) exIds.add(existingUpdate.getId()); log.trace(s_loc.get("cache-commit", new Object[]{ addIds, upIds, exIds, deletes })); } }
public void commit(Collection<DataCachePCData> additions, Collection<DataCachePCData> newUpdates, Collection<DataCachePCData> existingUpdates, Collection<Object> deletes) { // remove all objects in deletes list removeAllInternal(deletes); // next, add all the new additions putAllInternal(additions); putAllInternal(newUpdates); // possibly add the existing updates, depending on the // semantics of the cache, as dictated by recacheUpdates() if (recacheUpdates()) putAllInternal(existingUpdates); if (log.isTraceEnabled()) { Collection<Object> addIds = new ArrayList<Object>(additions.size()); Collection<Object> upIds = new ArrayList<Object>(newUpdates.size()); Collection<Object> exIds = new ArrayList<Object>(existingUpdates.size()); for (DataCachePCData addition : additions) addIds.add(addition.getId()); for (DataCachePCData newUpdate : newUpdates) upIds.add(newUpdate.getId()); for (DataCachePCData existingUpdate : existingUpdates) exIds.add(existingUpdate.getId()); log.trace(s_loc.get("cache-commit", new Object[]{ addIds, upIds, exIds, deletes })); } }
/** * This method is part of the {@link RemoteCommitListener} interface. If * your cache subclass relies on OpenJPA for clustering support, make it * implement <code>RemoteCommitListener</code>. This method will take * care of invalidating entries from remote commits. */ public void afterCommit(RemoteCommitEvent event) { if (_closed) return; if (event.getPayloadType() == RemoteCommitEvent.PAYLOAD_EXTENTS) { removeAllTypeNamesInternal(event.getUpdatedTypeNames()); removeAllTypeNamesInternal(event.getDeletedTypeNames()); } else { // drop all the committed OIDs, excepting brand // new OIDs. brand new OIDs either won't be in // the cache, or if they are, will be more up to date removeAllInternal(event.getUpdatedObjectIds()); removeAllInternal(event.getDeletedObjectIds()); } }
/** * This method is part of the {@link RemoteCommitListener} interface. If * your cache subclass relies on OpenJPA for clustering support, make it * implement <code>RemoteCommitListener</code>. This method will take * care of invalidating entries from remote commits. */ public void afterCommit(RemoteCommitEvent event) { if (_closed) return; if (event.getPayloadType() == RemoteCommitEvent.PAYLOAD_EXTENTS) { removeAllTypeNamesInternal(event.getUpdatedTypeNames()); removeAllTypeNamesInternal(event.getDeletedTypeNames()); } else { // drop all the committed OIDs, excepting brand // new OIDs. brand new OIDs either won't be in // the cache, or if they are, will be more up to date removeAllInternal(event.getUpdatedObjectIds()); removeAllInternal(event.getDeletedObjectIds()); } }
/** * This method is part of the {@link RemoteCommitListener} interface. If * your cache subclass relies on OpenJPA for clustering support, make it * implement <code>RemoteCommitListener</code>. This method will take * care of invalidating entries from remote commits. */ public void afterCommit(RemoteCommitEvent event) { if (_closed) return; if (event.getPayloadType() == RemoteCommitEvent.PAYLOAD_EXTENTS) { removeAllTypeNamesInternal(event.getUpdatedTypeNames()); removeAllTypeNamesInternal(event.getDeletedTypeNames()); } else { // drop all the committed OIDs, excepting brand // new OIDs. brand new OIDs either won't be in // the cache, or if they are, will be more up to date removeAllInternal(event.getUpdatedObjectIds()); removeAllInternal(event.getDeletedObjectIds()); } }
/** * This method is part of the {@link RemoteCommitListener} interface. If * your cache subclass relies on OpenJPA for clustering support, make it * implement <code>RemoteCommitListener</code>. This method will take * care of invalidating entries from remote commits. */ public void afterCommit(RemoteCommitEvent event) { if (_closed) return; if (event.getPayloadType() == RemoteCommitEvent.PAYLOAD_EXTENTS) { removeAllTypeNamesInternal(event.getUpdatedTypeNames()); removeAllTypeNamesInternal(event.getDeletedTypeNames()); } else { // drop all the committed OIDs, excepting brand // new OIDs. brand new OIDs either won't be in // the cache, or if they are, will be more up to date removeAllInternal(event.getUpdatedObjectIds()); removeAllInternal(event.getDeletedObjectIds()); } }
/** * This method is part of the {@link RemoteCommitListener} interface. If * your cache subclass relies on OpenJPA for clustering support, make it * implement <code>RemoteCommitListener</code>. This method will take * care of invalidating entries from remote commits. */ public void afterCommit(RemoteCommitEvent event) { if (_closed) return; if (event.getPayloadType() == RemoteCommitEvent.PAYLOAD_EXTENTS) { removeAllTypeNamesInternal(event.getUpdatedTypeNames()); removeAllTypeNamesInternal(event.getDeletedTypeNames()); } else { // drop all the committed OIDs, excepting brand // new OIDs. brand new OIDs either won't be in // the cache, or if they are, will be more up to date removeAllInternal(event.getUpdatedObjectIds()); removeAllInternal(event.getDeletedObjectIds()); } }