MultiOperationRecord (Apache ZooKeeper - Server 3.7.0 API)
Date: 2021-03-17

org.apache.zookeeper

## Class MultiOperationRecord

- java.lang.Object
- - org.apache.zookeeper.MultiOperationRecord

- All Implemented Interfaces:
    Iterable<Op>, Record

      public class MultiOperationRecord
      extends Object
      implements Record, 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 and Description
    `MultiOperationRecord()`
    `MultiOperationRecord(Iterable<Op> ops)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `add(Op op)`
    `void` | `deserialize(InputArchive archive, String tag)`
    `boolean` | `equals(Object o)`
    `Op.OpKind` | `getOpKind()` Returns the kind of the operations contained by the record.
    `int` | `hashCode()`
    `Iterator<Op>` | `iterator()`
    `void` | `serialize(OutputArchive archive, String tag)`
    `int` | `size()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface java.lang.Iterable

      `forEach, spliterator`

- - ### Constructor Detail

    - #### MultiOperationRecord

          public MultiOperationRecord()

    - #### MultiOperationRecord

          public MultiOperationRecord(Iterable<Op> ops)
                               throws IllegalArgumentException

      Throws:
        `IllegalArgumentException`

  - ### Method Detail

    - #### iterator

          public Iterator<Op> iterator()

      Specified by:
        `iterator` in interface `Iterable<Op>`

    - #### add

          public void add(Op op)
                   throws IllegalArgumentException

      Throws:
        `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,
                                String tag)
                         throws IOException

      Specified by:
        `serialize` in interface `Record`
      Throws:
        `IOException`

    - #### deserialize

          public void deserialize(InputArchive archive,
                                  String tag)
                           throws IOException

      Specified by:
        `deserialize` in interface `Record`
      Throws:
        `IOException`

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

Copyright © 2008–2021 The Apache Software Foundation. All rights reserved.