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 class
Operation.Builder
A builder forOperation
objects.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
boolean
first()
Returnstrue
if the corresponding entry is the first log entry in the operation,false
otherwise.String
getId()
Returns the operation identifier.String
getProducer()
Returns an arbitrary producer identifier.int
hashCode()
boolean
last()
Returnstrue
if the corresponding entry is the last log entry in the operation,false
otherwise.static Operation.Builder
newBuilder(String id, String producer)
Returns a builder forOperation
objects given the operation and producer identifiers.static Operation
of(String id, String producer)
Returns aOperation
object given the operation and producer identifiers.Operation.Builder
toBuilder()
Returns aBuilder
for this operation.String
toString()
-
-
-
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()
Returnstrue
if the corresponding entry is the first log entry in the operation,false
otherwise.
-
last
public boolean last()
Returnstrue
if the corresponding entry is the last log entry in the operation,false
otherwise.
-
toBuilder
public Operation.Builder toBuilder()
Returns aBuilder
for this operation.
-
newBuilder
public static Operation.Builder newBuilder(String id, String producer)
Returns a builder forOperation
objects given the operation and producer identifiers. The combination of producer and id must be globally unique.
-
-