Package org.apache.zookeeper
Class MultiOperationRecord
- java.lang.Object
-
- org.apache.zookeeper.MultiOperationRecord
-
public class MultiOperationRecord extends java.lang.Object implements Record, java.lang.Iterable<Op>
Encodes a composite operation. In the wire format, each operation consists of a single MultiHeader followed by the appropriate request. Each of these MultiHeaders has a type which indicates the type of the following operation or a negative number if no more operations are included. All of the operations must be from the same OpKind.
-
-
Constructor Summary
Constructors Constructor Description MultiOperationRecord()
MultiOperationRecord(java.lang.Iterable<Op> ops)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(Op op)
void
deserialize(InputArchive archive, java.lang.String tag)
boolean
equals(java.lang.Object o)
Op.OpKind
getOpKind()
Returns the kind of the operations contained by the record.int
hashCode()
java.util.Iterator<Op>
iterator()
void
serialize(OutputArchive archive, java.lang.String tag)
int
size()
-
-
-
Constructor Detail
-
MultiOperationRecord
public MultiOperationRecord()
-
MultiOperationRecord
public MultiOperationRecord(java.lang.Iterable<Op> ops) throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
-
-
Method Detail
-
iterator
public java.util.Iterator<Op> iterator()
- Specified by:
iterator
in interfacejava.lang.Iterable<Op>
-
add
public void add(Op op) throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
-
size
public int size()
-
getOpKind
public Op.OpKind getOpKind()
Returns the kind of the operations contained by the record.- Returns:
- The OpKind value of all the elements in the record.
-
serialize
public void serialize(OutputArchive archive, java.lang.String tag) throws java.io.IOException
-
deserialize
public void deserialize(InputArchive archive, java.lang.String tag) throws java.io.IOException
- Specified by:
deserialize
in interfaceRecord
- Throws:
java.io.IOException
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-