|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.directory.mitosis.operation.Operation
public class Operation
Represents an operation performed on one or more entries in replicated
Partition. Each Operation has its own CSN which
identifies itself.
An Operation is usually created by calling factory methods in
OperationFactory, which produces a CompositeOperation of
smaller multiple operations. For example,
OperationFactory.newDelete(LdapDN) returns a
CompositeOperation which consists of two
ReplaceAttributeOperations; one updates Constants.ENTRY_CSN
attribute and the other updates Constants.ENTRY_DELETED. Refer
to OperationFactory to find out what LDAP/JNDI operation is
translated into what Operation instance.
| Field Summary | |
|---|---|
protected CSN |
csn
The entry CSN |
protected OperationType |
operationType
The operation type |
protected Registries |
registries
A reference on the server registries |
| Constructor Summary | |
|---|---|
protected |
Operation(Registries registries,
OperationType operationType,
CSN csn)
Creates a new instance of Operation, for the entry which csn is given as a parameter. |
| Method Summary | |
|---|---|
static Operation |
deserialize(Registries registries,
java.io.ObjectInput in)
Deserialize an operation. |
void |
execute(PartitionNexus nexus,
ReplicationStore store,
CoreSession coreSession)
Replicates this operation on the specified nexus. |
protected void |
execute0(PartitionNexus nexus,
ReplicationStore store,
CoreSession coreSession)
Not supported. |
CSN |
getCSN()
|
void |
readExternal(java.io.ObjectInput in)
Read the CSN from an input stream |
static void |
serialize(Operation operation,
java.io.ObjectOutput out)
Serialize an operation. |
java.lang.String |
toString()
|
void |
writeExternal(java.io.ObjectOutput out)
Write the CSN to an output stream |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected CSN csn
protected OperationType operationType
protected Registries registries
| Constructor Detail |
|---|
protected Operation(Registries registries,
OperationType operationType,
CSN csn)
registries - the server registriesoperationType - the operation typecsn - The entry's csn.| Method Detail |
|---|
public CSN getCSN()
CSN for this operation.
public final void execute(PartitionNexus nexus,
ReplicationStore store,
CoreSession coreSession)
throws java.lang.Exception
nexus - the partition nexusstore - the replication storecoreSession - the current session
java.lang.Exception
protected void execute0(PartitionNexus nexus,
ReplicationStore store,
CoreSession coreSession)
throws java.lang.Exception
nexus - the partition nexusstore - the replication storecoreSession - the current session
java.lang.Exception
public static Operation deserialize(Registries registries,
java.io.ObjectInput in)
throws java.lang.ClassNotFoundException,
java.io.IOException
registries - The server registriesin - the stream wrom which we will read an operation
java.lang.ClassNotFoundException
java.io.IOException
public static void serialize(Operation operation,
java.io.ObjectOutput out)
throws java.lang.ClassNotFoundException,
java.io.IOException
operation - the operation to serializeout - the stream into which the resulting serialized operation will be stored
java.lang.ClassNotFoundException
java.io.IOException
public void readExternal(java.io.ObjectInput in)
throws java.lang.ClassNotFoundException,
java.io.IOException
readExternal in interface java.io.Externalizablein - the input stream
java.lang.ClassNotFoundException - if the read object is not a CSN
java.io.IOException - if we can't read from the input stream
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizableout - the output stream in which the CSN is written
java.io.IOException - if we can't write to the streampublic java.lang.String toString()
toString in class java.lang.ObjectObject.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||