Search in sources :

Example 11 with DistTxEntryEvent

use of org.apache.geode.internal.cache.tx.DistTxEntryEvent in project geode by apache.

the class DistPeerTXStateStub method invalidateOnRemote.

/*
   * (non-Javadoc)
   * 
   * @see org.apache.geode.internal.cache.InternalDataView#invalidateOnRemote
   * (org.apache.geode.internal.cache.EntryEventImpl, boolean, boolean)
   */
public void invalidateOnRemote(EntryEventImpl event, boolean invokeCallbacks, boolean forceNewEntry) throws DataLocationException {
    // logger.debug("DistPeerTXStateStub.invalidateOnRemote", new Throwable());
    super.invalidateExistingEntry(event, invokeCallbacks, forceNewEntry);
    this.primaryTransactionalOperations.add(new DistTxEntryEvent(event));
}
Also used : DistTxEntryEvent(org.apache.geode.internal.cache.tx.DistTxEntryEvent)

Example 12 with DistTxEntryEvent

use of org.apache.geode.internal.cache.tx.DistTxEntryEvent in project geode by apache.

the class DistTXStateOnCoordinator method postPutAll.

public void postPutAll(DistributedPutAllOperation putallOp, VersionedObjectList successfulPuts, LocalRegion region) {
    super.postPutAll(putallOp, successfulPuts, region);
    // TODO DISTTX: event is never released
    EntryEventImpl event = EntryEventImpl.createPutAllEvent(putallOp, region, Operation.PUTALL_CREATE, putallOp.getBaseEvent().getKey(), putallOp.getBaseEvent().getValue());
    event.setEventId(putallOp.getBaseEvent().getEventId());
    DistTxEntryEvent dtop = new DistTxEntryEvent(event);
    dtop.setPutAllOperation(putallOp);
    addPrimaryTransactionalOperations(dtop);
}
Also used : DistTxEntryEvent(org.apache.geode.internal.cache.tx.DistTxEntryEvent)

Example 13 with DistTxEntryEvent

use of org.apache.geode.internal.cache.tx.DistTxEntryEvent in project geode by apache.

the class DistTXStateOnCoordinator method invalidateExistingEntry.

/*
   * (non-Javadoc)
   * 
   * @see org.apache.geode.internal.cache.TXStateInterface#invalidateExistingEntry
   * (org.apache.geode.internal.cache.EntryEventImpl, boolean, boolean)
   */
public void invalidateExistingEntry(EntryEventImpl event, boolean invokeCallbacks, boolean forceNewEntry) {
    // logger
    // .debug("DistTXStateOnCoordinator.invalidateExistingEntry", new Throwable());
    super.invalidateExistingEntry(event, invokeCallbacks, forceNewEntry);
    addPrimaryTransactionalOperations(new DistTxEntryEvent(event));
}
Also used : DistTxEntryEvent(org.apache.geode.internal.cache.tx.DistTxEntryEvent)

Example 14 with DistTxEntryEvent

use of org.apache.geode.internal.cache.tx.DistTxEntryEvent in project geode by apache.

the class DistPeerTXStateStub method putEntry.

/*
   * (non-Javadoc)
   * 
   * @see org.apache.geode.internal.cache.TXStateStub#putEntry(org.apache.geode
   * .internal.cache.EntryEventImpl, boolean, boolean, java.lang.Object, boolean, long, boolean)
   */
@Override
public boolean putEntry(EntryEventImpl event, boolean ifNew, boolean ifOld, Object expectedOldValue, boolean requireOldValue, long lastModified, boolean overwriteDestroyed) {
    if (logger.isDebugEnabled()) {
        // [DISTTX] TODO Remove throwable
        logger.debug("DistPeerTXStateStub.putEntry " + event.getKeyInfo().getKey(), new Throwable());
    }
    boolean returnValue = super.putEntry(event, ifNew, ifOld, expectedOldValue, requireOldValue, lastModified, overwriteDestroyed);
    addPrimaryTransactionalOperations(new DistTxEntryEvent(event));
    return returnValue;
}
Also used : DistTxEntryEvent(org.apache.geode.internal.cache.tx.DistTxEntryEvent)

Example 15 with DistTxEntryEvent

use of org.apache.geode.internal.cache.tx.DistTxEntryEvent in project geode by apache.

the class DistPeerTXStateStub method putEntryOnRemote.

/*
   * (non-Javadoc)
   * 
   * @see org.apache.geode.internal.cache.InternalDataView#putEntryOnRemote(org
   * .apache.geode.internal.cache.EntryEventImpl, boolean, boolean, java.lang.Object, boolean, long,
   * boolean)
   */
@Override
public boolean putEntryOnRemote(EntryEventImpl event, boolean ifNew, boolean ifOld, Object expectedOldValue, boolean requireOldValue, long lastModified, boolean overwriteDestroyed) throws DataLocationException {
    if (logger.isDebugEnabled()) {
        // [DISTTX] TODO Remove throwable
        logger.debug("DistPeerTXStateStub.putEntryOnRemote " + event.getKeyInfo().getKey(), new Throwable());
    }
    boolean returnValue = super.putEntryOnRemote(event, ifNew, ifOld, expectedOldValue, requireOldValue, lastModified, overwriteDestroyed);
    addPrimaryTransactionalOperations(new DistTxEntryEvent(event));
    return returnValue;
}
Also used : DistTxEntryEvent(org.apache.geode.internal.cache.tx.DistTxEntryEvent)

Aggregations

DistTxEntryEvent (org.apache.geode.internal.cache.tx.DistTxEntryEvent)15 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 InvalidDeltaException (org.apache.geode.InvalidDeltaException)1 CacheWriterException (org.apache.geode.cache.CacheWriterException)1 DistributedMember (org.apache.geode.distributed.DistributedMember)1 InternalDistributedMember (org.apache.geode.distributed.internal.membership.InternalDistributedMember)1 DistTxKeyInfo (org.apache.geode.internal.cache.tx.DistTxKeyInfo)1 UnitTest (org.apache.geode.test.junit.categories.UnitTest)1 Test (org.junit.Test)1