com.oracle.coherence.patterns.command.commands
Class CommandBatch<C extends Context>

java.lang.Object
  extended by com.oracle.coherence.patterns.command.commands.CommandBatch<C>
All Implemented Interfaces:
Command<C>, com.tangosol.io.ExternalizableLite, com.tangosol.io.pof.PortableObject, Serializable

public class CommandBatch<C extends Context>
extends Object
implements Command<C>, com.tangosol.io.ExternalizableLite, com.tangosol.io.pof.PortableObject

A CommandBatch allows a batch (List) of Commands to be submitted to a single Context for execution in an all or nothing mode.

NOTE: Any exception caused by a Command in the CommandBatch will cause the fail-fast of the processing. Commands not yet processed will be discarded.

Copyright (c) 2008. All Rights Reserved. Oracle Corporation.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.

Author:
Brian Oliver
See Also:
Serialized Form

Constructor Summary
CommandBatch()
          Required for ExternalizableLite and PortableObject.
CommandBatch(List<Command<C>> commands)
          Standard Constructor.
 
Method Summary
 void execute(ExecutionEnvironment<C> executionEnvironment)
          Executes the Command using the provided ExecutionEnvironment.
 void readExternal(DataInput in)
          
 void readExternal(com.tangosol.io.pof.PofReader reader)
          
 String toString()
          
 void writeExternal(DataOutput out)
          
 void writeExternal(com.tangosol.io.pof.PofWriter writer)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CommandBatch

public CommandBatch()
Required for ExternalizableLite and PortableObject.


CommandBatch

public CommandBatch(List<Command<C>> commands)
Standard Constructor.

Parameters:
commands -
Method Detail

execute

public void execute(ExecutionEnvironment<C> executionEnvironment)
Executes the Command using the provided ExecutionEnvironment.

Specified by:
execute in interface Command<C extends Context>
Parameters:
executionEnvironment - The environment in which the Command is being executed.

readExternal

public void readExternal(DataInput in)
                  throws IOException

Specified by:
readExternal in interface com.tangosol.io.ExternalizableLite
Throws:
IOException

writeExternal

public void writeExternal(DataOutput out)
                   throws IOException

Specified by:
writeExternal in interface com.tangosol.io.ExternalizableLite
Throws:
IOException

readExternal

public void readExternal(com.tangosol.io.pof.PofReader reader)
                  throws IOException

Specified by:
readExternal in interface com.tangosol.io.pof.PortableObject
Throws:
IOException

writeExternal

public void writeExternal(com.tangosol.io.pof.PofWriter writer)
                   throws IOException

Specified by:
writeExternal in interface com.tangosol.io.pof.PortableObject
Throws:
IOException

toString

public String toString()

Overrides:
toString in class Object


Copyright © 2016. All rights reserved.