org.apache.directory.mitosis.operation
Class CompositeOperation

java.lang.Object
  extended by org.apache.directory.mitosis.operation.Operation
      extended by org.apache.directory.mitosis.operation.CompositeOperation
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable

public class CompositeOperation
extends Operation

An Operation that contains other Operations.

Author:
Apache Directory Project
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.directory.mitosis.operation.Operation
csn, operationType, registries
 
Constructor Summary
CompositeOperation(Registries registries, CSN csn)
          Creates a new instance of CompositeOperation.
 
Method Summary
 void add(Operation op)
          Add a new operation to this composite operation
 void clear()
          Remove all the inner operations.
protected  void execute0(PartitionNexus nexus, ReplicationStore store, CoreSession coreSession)
          Apply the replication on each internal operation.
 java.util.List<Operation> getChildren()
           
 int size()
           
 java.lang.String toString()
           
 
Methods inherited from class org.apache.directory.mitosis.operation.Operation
deserialize, execute, getCSN, readExternal, serialize, writeExternal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CompositeOperation

public CompositeOperation(Registries registries,
                          CSN csn)
Creates a new instance of CompositeOperation.

Parameters:
registries - The server registries
csn - the operation CSN
Method Detail

add

public void add(Operation op)
Add a new operation to this composite operation

Parameters:
op - The added operation

clear

public void clear()
Remove all the inner operations.


execute0

protected void execute0(PartitionNexus nexus,
                        ReplicationStore store,
                        CoreSession coreSession)
                 throws java.lang.Exception
Apply the replication on each internal operation.

Overrides:
execute0 in class Operation
Parameters:
nexus - the partition on which the modification will be done
store - the replication store
coreSession - the current session
Throws:
java.lang.Exception

size

public int size()
Returns:
the number of included operations

getChildren

public java.util.List<Operation> getChildren()
Returns:
The list of all included operations

toString

public java.lang.String toString()
Overrides:
toString in class Operation
See Also:
Object.toString()


Copyright © 2003-2009 Apache Software Foundation. All Rights Reserved.