public void freePendingCallbacks() { for (EntryEventImpl ee: getPendingCallbacks()) { ee.release(); } }
private final void txApplyInvalidateLocally(LocalRegion r, Object key, Object newValue, boolean didDestroy, TXState txState, TXRegionState txr, EntryEventImpl cbEvent) { try { r.txApplyInvalidate(this.regionEntry, txState, key, newValue, didDestroy, isOpLocalInvalidate() ? true : false, getNearSideEventId(txState), getCallbackArgument(), txState.getPendingCallbacks(), null, null, null, -1, txr, cbEvent); } catch (RegionDestroyedException ignore) { } catch (EntryDestroyedException ignore) { } }
private final void txApplyPutLocally(LocalRegion r, Operation putOp, Object key, Object newValue, boolean didDestroy, TXState txState, TXRegionState txr, EntryEventImpl cbEvent) { try { r.txApplyPut(putOp, this.regionEntry, txState, key, newValue, didDestroy, getNearSideEventId(txState), getCallbackArgument(), txState.getPendingCallbacks(), null, null, null, cbEvent.getTailKey(), txr, cbEvent, this.pendingDelta); } catch (RegionDestroyedException ignore) { } catch (EntryDestroyedException ignore) { } }
private final void txApplyPutLocally(LocalRegion r, Operation putOp, Object key, Object newValue, boolean didDestroy, TXState txState) { try { r.txApplyPut(putOp, key, newValue, didDestroy, txState.getTransactionId(), null, getNearSideEventId(txState), callBackArgument,txState.getPendingCallbacks(), getFilterRoutingInfo(), txState.bridgeContext, this, null, -1); } catch (RegionDestroyedException ignore) { } catch (EntryDestroyedException ignore) { } }
private final void txApplyInvalidateLocally(LocalRegion r, Object key, Object newValue, boolean didDestroy, TXState txState) { try { r.txApplyInvalidate(key, newValue, didDestroy, txState.getTransactionId(), null, isOpLocalInvalidate() ? true : false, getNearSideEventId(txState), callBackArgument,txState.getPendingCallbacks(), getFilterRoutingInfo(), txState.bridgeContext, this, null, -1); } catch (RegionDestroyedException ignore) { } catch (EntryDestroyedException ignore) { } }
private final void txApplyDestroyLocally(LocalRegion r, Object key, TXState txState) { boolean invokeCallbacks = isOpDestroyEvent(r); List<EntryEventImpl> pendingCallbacks = invokeCallbacks ? txState.getPendingCallbacks() : new ArrayList<EntryEventImpl>(); try { r.txApplyDestroy(key, txState.getTransactionId(), null, false/*inTokenMode*/, getDestroyOperation(), getNearSideEventId(txState), callBackArgument, pendingCallbacks ,getFilterRoutingInfo(), txState.bridgeContext, false, this, null, -1); } catch (RegionDestroyedException ignore) { } catch (EntryDestroyedException ignore) { } // if !isOpDestroyEvent then // this destroy, to local committed state, becomes a noop // since nothing needed to be done locally. // We don't want to actually do the destroy since we told the // transaction listener that no destroy was done. }
private final void txApplyDestroyLocally(LocalRegion r, Object key, TXState txState, TXRegionState txr, EntryEventImpl cbEvent) { if (isOpDestroyEvent(r)) { try { r.txApplyDestroy(this.regionEntry, txState, key, false /*inTokenMode*/, isOpLocalDestroy(), getNearSideEventId(txState), getCallbackArgument(), txState.getPendingCallbacks(), null, null, null, cbEvent.getTailKey(), txr, cbEvent); } catch (RegionDestroyedException ignore) { } catch (EntryDestroyedException ignore) { } } // if !isOpDestroyEvent then // this destroy, to local committed state, becomes a noop // since nothing needed to be done locally. // We don't want to actually do the destroy since we told the // transaction listener that no destroy was done. }
public void firePendingCallbacks() { final ArrayList<EntryEventImpl> callbacks = getPendingCallbacks(); if (callbacks == null || callbacks.isEmpty()) { return; } for (EntryEventImpl ee : callbacks) { final Operation op = ee.getOperation(); final LocalRegion region = ee.getRegion(); if (op.isCreate()) { region.invokeTXCallbacks(EnumListenerEvent.AFTER_CREATE, ee, true, true /*notifyGateway*/); } else if (op.isDestroy()) { region.invokeTXCallbacks(EnumListenerEvent.AFTER_DESTROY, ee, true, true /*notifyGateway*/); } else if (op.isInvalidate()) { region.invokeTXCallbacks(EnumListenerEvent.AFTER_INVALIDATE, ee, true, true /*notifyGateway*/); } else { region.invokeTXCallbacks(EnumListenerEvent.AFTER_UPDATE, ee, true, true /*notifyGateway*/); } } }
public void firePendingCallbacks() { for (EntryEventImpl ee: getPendingCallbacks()) { if(ee.getOperation().isDestroy()) { ee.getRegion().invokeTXCallbacks(EnumListenerEvent.AFTER_DESTROY, ee, true); } else if(ee.getOperation().isInvalidate()) { ee.getRegion().invokeTXCallbacks(EnumListenerEvent.AFTER_INVALIDATE, ee, true); } else if(ee.getOperation().isCreate()) { ee.getRegion().invokeTXCallbacks(EnumListenerEvent.AFTER_CREATE, ee, true); } else { ee.getRegion().invokeTXCallbacks(EnumListenerEvent.AFTER_UPDATE, ee, true); } } }