Package com.google.cloud.logging
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:
- Log Entry Operation, Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classOperation.BuilderA builder forOperationobjects.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)booleanfirst()Returnstrueif the corresponding entry is the first log entry in the operation,falseotherwise.StringgetId()Returns the operation identifier.StringgetProducer()Returns an arbitrary producer identifier.inthashCode()booleanlast()Returnstrueif the corresponding entry is the last log entry in the operation,falseotherwise.static Operation.BuildernewBuilder(String id, String producer)Returns a builder forOperationobjects given the operation and producer identifiers.static Operationof(String id, String producer)Returns aOperationobject given the operation and producer identifiers.Operation.BuildertoBuilder()Returns aBuilderfor this operation.StringtoString()
-
-
-
Method Detail
-
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 andgetProducer()must be globally unique.
-
getProducer
public String getProducer()
Returns an arbitrary producer identifier. The combination of this value andgetId()must be globally unique. Examples:MyDivision.MyBigCompany.com,github.com/MyProject/MyApplication.
-
first
public boolean first()
Returnstrueif the corresponding entry is the first log entry in the operation,falseotherwise.
-
last
public boolean last()
Returnstrueif the corresponding entry is the last log entry in the operation,falseotherwise.
-
toBuilder
public Operation.Builder toBuilder()
Returns aBuilderfor this operation.
-
newBuilder
public static Operation.Builder newBuilder(String id, String producer)
Returns a builder forOperationobjects given the operation and producer identifiers. The combination of producer and id must be globally unique.
-
-