Class Operation

java.lang.Object
com.google.cloud.logging.Operation
All Implemented Interfaces:
Serializable

public final class Operation extends Object implements Serializable
Additional information about a potentially long-running operation with which a log entry is associated.
See Also:
  • Method Details

    • getId

      public String getId()
      Returns the operation identifier. Log entries with the same identifier are assumed to be part of the same operation. The combination of this value and getProducer() must be globally unique.
    • getProducer

      public String getProducer()
      Returns an arbitrary producer identifier. The combination of this value and getId() must be globally unique. Examples: MyDivision.MyBigCompany.com, github.com/MyProject/MyApplication.
    • first

      public boolean first()
      Returns true if the corresponding entry is the first log entry in the operation, false otherwise.
    • last

      public boolean last()
      Returns true if the corresponding entry is the last log entry in the operation, false otherwise.
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toBuilder

      public Operation.Builder toBuilder()
      Returns a Builder for this operation.
    • newBuilder

      public static Operation.Builder newBuilder(String id, String producer)
      Returns a builder for Operation objects given the operation and producer identifiers. The combination of producer and id must be globally unique.
    • of

      public static Operation of(String id, String producer)
      Returns a Operation object given the operation and producer identifiers. The combination of producer and id must be globally unique.