/* * JBoss, Home of Professional Open Source * Copyright 2009 Red Hat Inc. and/or its affiliates and other * contributors as indicated by the @author tags. All rights reserved. * See the copyright.txt in the distribution for a full listing of * individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.infinispan.commands; import org.infinispan.commands.control.LockControlCommand; import org.infinispan.commands.read.DistributedExecuteCommand; import org.infinispan.commands.read.EntrySetCommand; import org.infinispan.commands.read.GetKeyValueCommand; import org.infinispan.commands.read.KeySetCommand; import org.infinispan.commands.read.SizeCommand; import org.infinispan.commands.read.ValuesCommand; import org.infinispan.commands.tx.CommitCommand; import org.infinispan.commands.tx.PrepareCommand; import org.infinispan.commands.tx.RollbackCommand; import org.infinispan.commands.write.ApplyDeltaCommand; import org.infinispan.commands.write.ClearCommand; import org.infinispan.commands.write.EvictCommand; import org.infinispan.commands.write.InvalidateCommand; import org.infinispan.commands.write.InvalidateL1Command; import org.infinispan.commands.write.PutKeyValueCommand; import org.infinispan.commands.write.PutMapCommand; import org.infinispan.commands.write.RemoveCommand; import org.infinispan.commands.write.ReplaceCommand; import org.infinispan.context.InvocationContext; import org.infinispan.context.impl.TxInvocationContext; /** * @author Mircea.Markus@jboss.com * @author Galder ZamarreƱo * @since 4.0 */ public interface Visitor { // write commands Object visitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable; Object visitRemoveCommand(InvocationContext ctx, RemoveCommand command) throws Throwable; Object visitReplaceCommand(InvocationContext ctx, ReplaceCommand command) throws Throwable; Object visitClearCommand(InvocationContext ctx, ClearCommand command) throws Throwable; Object visitPutMapCommand(InvocationContext ctx, PutMapCommand command) throws Throwable; Object visitEvictCommand(InvocationContext ctx, EvictCommand command) throws Throwable; Object visitApplyDeltaCommand(InvocationContext ctx, ApplyDeltaCommand command) throws Throwable; // read commands Object visitSizeCommand(InvocationContext ctx, SizeCommand command) throws Throwable; Object visitGetKeyValueCommand(InvocationContext ctx, GetKeyValueCommand command) throws Throwable; Object visitKeySetCommand(InvocationContext ctx, KeySetCommand command) throws Throwable; Object visitValuesCommand(InvocationContext ctx, ValuesCommand command) throws Throwable; Object visitEntrySetCommand(InvocationContext ctx, EntrySetCommand command) throws Throwable; // tx commands Object visitPrepareCommand(TxInvocationContext ctx, PrepareCommand command) throws Throwable; Object visitRollbackCommand(TxInvocationContext ctx, RollbackCommand command) throws Throwable; Object visitCommitCommand(TxInvocationContext ctx, CommitCommand command) throws Throwable; Object visitInvalidateCommand(InvocationContext ctx, InvalidateCommand invalidateCommand) throws Throwable; Object visitInvalidateL1Command(InvocationContext ctx, InvalidateL1Command invalidateL1Command) throws Throwable; // locking commands Object visitLockControlCommand(TxInvocationContext ctx, LockControlCommand command) throws Throwable; Object visitUnknownCommand(InvocationContext ctx, VisitableCommand command) throws Throwable; Object visitDistributedExecuteCommand(InvocationContext ctx, DistributedExecuteCommand<?> command) throws Throwable; Object visitSetClassCommand(InvocationContext ctx, SetClassCommand command) throws Throwable; }