org.usergrid.persistence.cassandra.util
Class TimedOpTag

java.lang.Object
  extended by org.usergrid.persistence.cassandra.util.TimedOpTag

public class TimedOpTag
extends Object

Simple struct holding timer information for an operation and an arbitrary tag for spanning 0 or more operations

Author:
zznate

Method Summary
 long getElapsed()
          Elapsed time of this op in milliseconds.
 boolean getOpSuccessful()
           
 UUID getOpTag()
          The tag for this specific operation
 long getStart()
          The start time of this operation as represented by the timestamp embedded in the type-1 UUID of the opTag property
 String getTagName()
           
 String getTraceTagName()
          A tag which may span 0 or more operations
static TimedOpTag instance(TraceTag traceTag)
          Get an instance with the current start timer set to 'now'
 void stopAndApply(String tName, boolean opStatus)
          Apply tagName only if not already applied
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

instance

public static TimedOpTag instance(TraceTag traceTag)
Get an instance with the current start timer set to 'now'

Parameters:
traceTag - can be null for single op timing
Returns:

stopAndApply

public void stopAndApply(String tName,
                         boolean opStatus)
Apply tagName only if not already applied

Parameters:
tName -

getElapsed

public long getElapsed()
Elapsed time of this op in milliseconds.

Returns:

getStart

public long getStart()
The start time of this operation as represented by the timestamp embedded in the type-1 UUID of the opTag property

Returns:

getOpTag

public UUID getOpTag()
The tag for this specific operation

Returns:

getTraceTagName

public String getTraceTagName()
A tag which may span 0 or more operations

Returns:

getTagName

public String getTagName()
Returns:
the tagName - null if never applied

getOpSuccessful

public boolean getOpSuccessful()
Returns:
whether or not the operation was 'successful' Could still be false if stopAndApply(String, boolean) was never called

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013. All Rights Reserved.