/** * 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()); } }
/** * Fire an event to local listeners only notifying them of a detected * stale record. * * @since 1.0.0 */ public void fireLocalStaleNotification(Object oid) { RemoteCommitEvent ev = new RemoteCommitEvent( RemoteCommitEvent.PAYLOAD_LOCAL_STALE_DETECTION, null, null, Collections.singleton(oid), null); fireEvent(ev); }
/** * 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()); } }
/** * Fire an event to local listeners only notifying them of a detected * stale record. * * @since 1.0.0 */ public void fireLocalStaleNotification(Object oid) { RemoteCommitEvent ev = new RemoteCommitEvent( RemoteCommitEvent.PAYLOAD_LOCAL_STALE_DETECTION, null, null, Collections.singleton(oid), null); fireEvent(ev); }
/** * 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()); } }
/** * Fire an event to local listeners only notifying them of a detected * stale record. * * @since 1.0.0 */ public void fireLocalStaleNotification(Object oid) { RemoteCommitEvent ev = new RemoteCommitEvent( RemoteCommitEvent.PAYLOAD_LOCAL_STALE_DETECTION, null, null, Collections.singleton(oid), null); fireEvent(ev); }
/** * 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()); } }
/** * Fire an event to local listeners only notifying them of a detected * stale record. * * @since 1.0.0 */ public void fireLocalStaleNotification(Object oid) { RemoteCommitEvent ev = new RemoteCommitEvent( RemoteCommitEvent.PAYLOAD_LOCAL_STALE_DETECTION, null, null, Collections.singleton(oid), null); fireEvent(ev); }
/** * 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()); } }
/** * Fire an event to local listeners only notifying them of a detected * stale record. * * @since 1.0.0 */ public void fireLocalStaleNotification(Object oid) { RemoteCommitEvent ev = new RemoteCommitEvent( RemoteCommitEvent.PAYLOAD_LOCAL_STALE_DETECTION, null, null, Collections.singleton(oid), null); fireEvent(ev); }
/** * 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, by delegating to * {@link #onTypesChanged}. */ public void afterCommit(RemoteCommitEvent event) { if (_closed) return; // drop all committed classes Set classes = Caches.addTypesByName(conf, event.getPersistedTypeNames(), null); if (event.getPayloadType() == RemoteCommitEvent.PAYLOAD_EXTENTS) { classes = Caches.addTypesByName(conf, event.getUpdatedTypeNames(), classes); classes = Caches.addTypesByName(conf, event.getDeletedTypeNames(), classes); } else { classes = addTypes(event.getUpdatedObjectIds(), classes); classes = addTypes(event.getDeletedObjectIds(), classes); } if (classes != null) onTypesChanged(new TypesChangedEvent(this, classes)); }
return null; return new RemoteCommitEvent(payload, persIds, addClassNames, updates, 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, by delegating to * {@link #onTypesChanged}. */ public void afterCommit(RemoteCommitEvent event) { if (_closed) return; // drop all committed classes Set classes = Caches.addTypesByName(conf, event.getPersistedTypeNames(), null); if (event.getPayloadType() == RemoteCommitEvent.PAYLOAD_EXTENTS) { classes = Caches.addTypesByName(conf, event.getUpdatedTypeNames(), classes); classes = Caches.addTypesByName(conf, event.getDeletedTypeNames(), classes); } else { classes = addTypes(event.getUpdatedObjectIds(), classes); classes = addTypes(event.getDeletedObjectIds(), classes); } if (classes != null) onTypesChanged(new TypesChangedEvent(this, classes)); }
return null; return new RemoteCommitEvent(payload, persIds, addClassNames, updates, 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, by delegating to * {@link #onTypesChanged}. */ public void afterCommit(RemoteCommitEvent event) { if (_closed) return; // drop all committed classes Set classes = Caches.addTypesByName(conf, event.getPersistedTypeNames(), null); if (event.getPayloadType() == RemoteCommitEvent.PAYLOAD_EXTENTS) { classes = Caches.addTypesByName(conf, event.getUpdatedTypeNames(), classes); classes = Caches.addTypesByName(conf, event.getDeletedTypeNames(), classes); } else { classes = addTypes(event.getUpdatedObjectIds(), classes); classes = addTypes(event.getDeletedObjectIds(), classes); } if (classes != null) onTypesChanged(new TypesChangedEvent(this, classes)); }
return null; return new RemoteCommitEvent(payload, persIds, addClassNames, updates, 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, by delegating to * {@link #onTypesChanged}. */ public void afterCommit(RemoteCommitEvent event) { if (_closed) return; // drop all committed classes Set classes = Caches.addTypesByName(conf, event.getPersistedTypeNames(), null); if (event.getPayloadType() == RemoteCommitEvent.PAYLOAD_EXTENTS) { classes = Caches.addTypesByName(conf, event.getUpdatedTypeNames(), classes); classes = Caches.addTypesByName(conf, event.getDeletedTypeNames(), classes); } else { classes = addTypes(event.getUpdatedObjectIds(), classes); classes = addTypes(event.getDeletedObjectIds(), classes); } if (classes != null) onTypesChanged(new TypesChangedEvent(this, classes)); }
return null; return new RemoteCommitEvent(payload, persIds, addClassNames, updates, 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, by delegating to * {@link #onTypesChanged}. */ public void afterCommit(RemoteCommitEvent event) { if (_closed) return; // drop all committed classes Set classes = Caches.addTypesByName(conf, event.getPersistedTypeNames(), null); if (event.getPayloadType() == RemoteCommitEvent.PAYLOAD_EXTENTS) { classes = Caches.addTypesByName(conf, event.getUpdatedTypeNames(), classes); classes = Caches.addTypesByName(conf, event.getDeletedTypeNames(), classes); } else { classes = addTypes(event.getUpdatedObjectIds(), classes); classes = addTypes(event.getDeletedObjectIds(), classes); } if (classes != null) onTypesChanged(new TypesChangedEvent(this, classes)); }
return null; return new RemoteCommitEvent(payload, persIds, addClassNames, updates, deletes);