@Override public void release() { this.event.release(); } }
public void release() { if (LocalRegion.this.enableOffHeapMemory && this.event instanceof EntryEventImpl) { ((EntryEventImpl)this.event).release(); } } }
public void release() { if (LocalRegion.this.offHeap && this.event instanceof EntryEventImpl) { ((EntryEventImpl)this.event).release(); } } }
public void freeOffHeapResources() { if (this.events != null) { for (EntryEventImpl e: (List<EntryEventImpl>)this.events) { e.release(); } } // TODO Auto-generated method stub } }
public void freeOffHeapResources() { // I do not use eventIterator here because it forces the lazy creation of EntryEventImpl by calling getEventForPosition. for (int i=0; i < this.putAllDataSize; i++) { PutAllEntryData entry = this.putAllData[i]; if (entry != null && entry.event != null) { entry.event.release(); } } }
public void freeOffHeapResources() { // I do not use eventIterator here because it forces the lazy creation of EntryEventImpl by calling getEventForPosition. for (int i=0; i < this.removeAllDataSize; i++) { RemoveAllEntryData entry = this.removeAllData[i]; if (entry != null && entry.event != null) { entry.event.release(); } } }
public void freeOffHeapResources() { // I do not use eventIterator here because it forces the lazy creation of EntryEventImpl by calling getEventForPosition. for (int i=0; i < this.putAllDataSize; i++) { PutAllEntryData entry = this.putAllData[i]; if (entry != null && entry.event != null) { entry.event.release(); } } }
/** * During sender is getting stopped, if there are any cache operation on queue then that event will be stored in temp queue. * Once sender is started, these event from tmp queue will be cleared. */ public void clearTempEventsAfterSenderStopped() { EntryEventImpl nextEvent = null; while ((nextEvent = tmpQueuedEvents.poll()) != null) { nextEvent.release(); } synchronized (this.queuedEventsSync) { while ((nextEvent = tmpQueuedEvents.poll()) != null) { nextEvent.release(); } this.enqueuedAllTempQueueEvents = false; } }
public void freePendingCallbacks() { for (EntryEventImpl ee: getPendingCallbacks()) { ee.release(); } }
@Override public synchronized void release() { if (this.events != null) { Iterator it = getEvents().iterator(); while (it.hasNext()) { Object o = it.next(); if (o instanceof EntryEventImpl) { ((EntryEventImpl) o).release(); } } } } }
@Override public synchronized void release() { if (this.events != null) { Iterator it = getEvents().iterator(); while (it.hasNext()) { Object o = it.next(); if (o instanceof EntryEventImpl) { ((EntryEventImpl) o).release(); } } } } }
/** * Removes the EntryEventImpl, whose tailKey matches with the provided tailKey, * from tmpQueueEvents. * @param tailKey */ public void removeFromTempQueueEvents(Object tailKey) { synchronized (this.queuedEventsSync) { Iterator<EntryEventImpl> itr = this.tmpQueuedEvents.iterator(); while (itr.hasNext()) { EntryEventImpl event = itr.next(); if (tailKey.equals(event.getTailKey())) { event.release(); itr.remove(); return; } } } }
public void destroyRecoveredEntry(Object key) { EntryEventImpl event = EntryEventImpl.create( this, Operation.LOCAL_DESTROY, key, null, null, false, getMyId(), false); try { event.inhibitCacheListenerNotification(true); mapDestroy(event, true, false, null, false, true); } finally { event.release(); } } public boolean lruLimitExceeded() {
public void destroyRecoveredEntry(Object key) { EntryEventImpl event = EntryEventImpl.create( this, Operation.LOCAL_DESTROY, key, null, null, false, getMyId(), false); try { event.inhibitCacheListenerNotification(true); mapDestroy(event, true, false, null, false, true); } finally { event.release(); } } public boolean lruLimitExceeded() {
public void close() { this.suspectEntriesLock.attemptWriteLock(-1); try { for (SuspectEntryList l : this.suspectEntries.values()) { for (EntryEventImpl e : l) { e.release(); } } } finally { this.suspectEntriesLock.releaseWriteLock(); } clear(null); }
@Override public void run() { DistributedRegion dr = (DistributedRegion)getCache().getRegion("region"); EventID eventID = new EventID(new byte[0], 1, 0); EntryEventImpl event = EntryEventImpl.create(dr, Operation.CREATE, "TestObject", "TestValue", null, false, memberID, true, eventID); event.setPossibleDuplicate(true); try { dr.hasSeenEvent(event); assertTrue("Expected to recover the version for the event ID", event.getVersionTag() != null); } finally { event.release(); } } });
@Override public void run() { DistributedRegion dr = (DistributedRegion)getCache().getRegion("region"); EventID eventID = new EventID(new byte[0], 1, 0); EntryEventImpl event = EntryEventImpl.create(dr, Operation.CREATE, "TestObject", "TestValue", null, false, memberID, true, eventID); try { event.setContext(new ClientProxyMembershipID(memberID)); boolean recovered = ((BaseCommand)Put70.getCommand()).recoverVersionTagForRetriedOperation(event); assertTrue("Expected to recover the version for this event ID", recovered); assertEquals("Expected the region version to be 123", 123, event.getVersionTag().getRegionVersion()); } finally { event.release(); } } });
@Override public final void removeAll(Collection keys, Object callbackArg) { final long startOp = CachePerfStats.getStatTime(); final DistributedRemoveAllOperation op = newRemoveAllOperation(keys, callbackArg); if (op != null) { try { basicRemoveAll(keys, op, null); } finally { op.getBaseEvent().release(); op.freeOffHeapResources(); } } getCachePerfStats().endRemoveAll(startOp); }
@Override public final void putAll(Map map, Object callbackArg) { long startPut = CachePerfStats.getStatTime(); final DistributedPutAllOperation putAllOp = newPutAllOperation(map, callbackArg); if (putAllOp != null) { try { basicPutAll(map, putAllOp, null); } finally { putAllOp.getBaseEvent().release(); putAllOp.freeOffHeapResources(); } } getCachePerfStats().endPutAll(startPut); }
public void run() { // final boolean requiresRegionContext = theRegion.keyRequiresRegionContext(); InternalDistributedMember myId = theRegion.getDistributionManager().getDistributionManagerId(); for (int i = 0; i < putallOp.putAllDataSize; ++i) { EntryEventImpl ev = PutAllPRMessage.getEventFromEntry(theRegion, myId,myId, i, putallOp.putAllData, false, putallOp.getBaseEvent().getContext(), false, !putallOp.getBaseEvent().isGenerateCallbacks(), false); try { ev.setPutAllOperation(putallOp); if (theRegion.basicPut(ev, false, false, null, false)) { successfulPuts.addKeyAndVersion(putallOp.putAllData[i].key, null); } } finally { ev.release(); } } } }, putallOp.getBaseEvent().getEventId());