Search in sources :

Example 1 with FutureUpdate

use of org.hibernate.cache.infinispan.util.FutureUpdate in project hibernate-orm by hibernate.

the class TombstoneCallInterceptor method visitPutKeyValueCommand.

@Override
public Object visitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable {
    MVCCEntry e = (MVCCEntry) ctx.lookupEntry(command.getKey());
    if (e == null) {
        return null;
    }
    log.tracef("In cache %s(%d) applying update %s to %s", cache.getName(), region.getLastRegionInvalidation(), command.getValue(), e.getValue());
    try {
        Object value = command.getValue();
        if (value instanceof TombstoneUpdate) {
            return handleTombstoneUpdate(e, (TombstoneUpdate) value, command);
        } else if (value instanceof Tombstone) {
            return handleTombstone(e, (Tombstone) value);
        } else if (value instanceof FutureUpdate) {
            return handleFutureUpdate(e, (FutureUpdate) value, command);
        } else {
            return super.visitPutKeyValueCommand(ctx, command);
        }
    } finally {
        log.tracef("Result is %s", e.getValue());
    }
}
Also used : TombstoneUpdate(org.hibernate.cache.infinispan.util.TombstoneUpdate) Tombstone(org.hibernate.cache.infinispan.util.Tombstone) MVCCEntry(org.infinispan.container.entries.MVCCEntry) FutureUpdate(org.hibernate.cache.infinispan.util.FutureUpdate)

Aggregations

FutureUpdate (org.hibernate.cache.infinispan.util.FutureUpdate)1 Tombstone (org.hibernate.cache.infinispan.util.Tombstone)1 TombstoneUpdate (org.hibernate.cache.infinispan.util.TombstoneUpdate)1 MVCCEntry (org.infinispan.container.entries.MVCCEntry)1