org.infinispan.statetransfer.AffectedKeysVisitor Maven / Gradle / Ivy
package org.infinispan.statetransfer;
import org.infinispan.commands.AbstractVisitor;
import org.infinispan.commands.control.LockControlCommand;
import org.infinispan.commands.tx.CommitCommand;
import org.infinispan.commands.tx.PrepareCommand;
import org.infinispan.commands.tx.RollbackCommand;
import org.infinispan.commands.write.*;
import org.infinispan.context.InvocationContext;
import org.infinispan.context.impl.TxInvocationContext;
import java.util.Collections;
import java.util.HashSet;
/**
* // TODO: Document this
*
* @author [email protected]
* @since 5.2
*/
class AffectedKeysVisitor extends AbstractVisitor {
@Override
public Object visitPrepareCommand(TxInvocationContext ctx, PrepareCommand command) {
return command.getAffectedKeys();
}
@Override
public Object visitCommitCommand(TxInvocationContext ctx, CommitCommand command) {
return ctx.getAffectedKeys();
}
@Override
public Object visitRollbackCommand(TxInvocationContext ctx, RollbackCommand command) {
return ctx.getAffectedKeys();
}
@Override
public Object visitLockControlCommand(TxInvocationContext ctx, LockControlCommand command) {
return new HashSet
© 2015 - 2025 Weber Informatics LLC | Privacy Policy