Example #1
0
 /**
  * Indicates that application tracking event has ended.
  *
  * @param ccode completion code of the tracking event
  * @param rcode reason code associated with this tracking event
  * @param opEx exception associated with this tracking event
  * @param endTime time when the tracking event has ended (usec)
  * @param elpasedUsec elapsed time in (usec)
  * @see OpCompCode
  */
 public void stop(
     OpCompCode ccode, int rcode, Throwable opEx, UsecTimestamp endTime, long elpasedUsec) {
   operation.setException(opEx);
   operation.setCompCode(ccode);
   operation.setReasonCode(rcode);
   operation.stop(endTime, elpasedUsec);
 }
Example #2
0
 /**
  * Return string representation of this tracking event
  *
  * @return string representation of the tracking event
  */
 @Override
 public String toString() {
   return "{"
       + operation.getSeverity()
       + ",["
       + getMessage()
       + "],"
       + "["
       + operation.getName()
       + "],"
       + super.toString()
       + ","
       + operation
       + "}";
 }
Example #3
0
 /**
  * Create a new instance of tracking event that can be timed and reported.
  *
  * @param tr tracker instance
  * @param src event source
  * @param severity severity level
  * @param opType operation type
  * @param opName operation name associated with this event (tracking event name)
  * @param correlator associated with this event (could be unique or passed from a correlated
  *     activity)
  * @param tag associated with this event
  * @param msg binary message associated with this event
  * @param args argument list passed along side the message
  * @see OpLevel
  * @see OpType
  */
 protected TrackingEvent(
     TrackerImpl tr,
     Source src,
     OpLevel severity,
     OpType opType,
     String opName,
     String correlator,
     String tag,
     byte[] msg,
     Object... args) {
   super(null, msg, args);
   tracker = tr;
   operation = new Operation(opName, opType);
   operation.setSeverity(severity);
   operation.setCorrelator(correlator);
   operation.setException(Utils.getThrowable(args));
   setSource(src);
   setLocation(src);
   setTag(tag);
 }
Example #4
0
 /**
  * Indicates that application tracking event has started given a specific time stamp.
  *
  * @param time when operation started
  */
 public void start(UsecTimestamp time) {
   operation.start(time);
 }
Example #5
0
 @Override
 public long getTTL() {
   return operation.getTTL();
 }
Example #6
0
 /**
  * Indicates that application tracking event has ended.
  *
  * @param ccode completion code of the tracking event
  * @param rcode reason code associated with this tracking event
  * @see OpCompCode
  */
 public void stop(OpCompCode ccode, int rcode) {
   operation.stop();
   operation.setCompCode(ccode);
   operation.setReasonCode(rcode);
 }
Example #7
0
 /**
  * Indicates that application tracking event has ended. Event completion code is set to <code>
  * OpCompCode.WARNING</code>
  *
  * @param opEx exception associated with this tracking event
  */
 public void stop(Throwable opEx) {
   operation.setException(opEx);
   operation.stop();
   operation.setCompCode(opEx != null ? OpCompCode.WARNING : OpCompCode.SUCCESS);
 }
Example #8
0
 /**
  * Indicates that application tracking event has ended.
  *
  * @param elaspedTime elapsed time of this event in (usec)
  */
 public void stop(long elaspedTime) {
   operation.stop(Useconds.CURRENT.get(), elaspedTime);
 }
Example #9
0
 @Override
 public void setCorrelator(Collection<String> cids) {
   operation.setCorrelator(cids);
 }
Example #10
0
 @Override
 public void setCorrelator(String... cids) {
   operation.setCorrelator(cids);
 }
Example #11
0
 /**
  * Return current severity level associated with this event
  *
  * @return severity level
  */
 public OpLevel getSeverity() {
   return operation.getSeverity();
 }
Example #12
0
 /**
  * Determine if operation was ever stopped
  *
  * @return true if operation was stopped, false otherwise
  */
 public boolean isStopped() {
   return operation.isStopped();
 }
Example #13
0
 /**
  * Determine if operation was ever started
  *
  * @return true if operation was started, false otherwise
  */
 public boolean isStarted() {
   return operation.isStarted();
 }
Example #14
0
 /**
  * Returns true of operation is a NOOP
  *
  * @return true if operation is a NOOP, false otherwise
  */
 public boolean isNoop() {
   return operation.isNoop();
 }
Example #15
0
 /** Indicates that application tracking event has ended. */
 public void stop() {
   operation.stop();
 }
Example #16
0
 /**
  * Indicates that application tracking event has ended.
  *
  * @param time when operation stopped
  * @param elapsedUsec elapsed time of the event in microseconds
  */
 public void stop(UsecTimestamp time, long elapsedUsec) {
   operation.stop(time, elapsedUsec);
 }
Example #17
0
 @Override
 public Set<String> getCorrelator() {
   return operation.getCorrelator();
 }
Example #18
0
 /**
  * Indicates that application tracking event has ended.
  *
  * @param endTimeUsec ending time associated with the event (usec)
  * @param elapsedUsec elapsed time in (usec)
  */
 public void stop(long endTimeUsec, long elapsedUsec) {
   operation.stop(endTimeUsec, elapsedUsec);
 }
Example #19
0
 /**
  * Gets the location string associated with the tracking event such as GPS locator.
  *
  * @return location string for tracking event
  */
 public String getLocation() {
   return operation.getLocation();
 }
Example #20
0
 /**
  * Indicates that application tracking event has ended. Event completion code is set to <code>
  * OpCompCode.WARNING</code>
  *
  * @param opEx exception associated with this tracking event
  * @param elapsedUsec elapsed time in (usec)
  */
 public void stop(Throwable opEx, long elapsedUsec) {
   operation.setException(opEx);
   operation.setCompCode(opEx != null ? OpCompCode.WARNING : OpCompCode.SUCCESS);
   operation.stop(Useconds.CURRENT.get(), elapsedUsec);
 }
Example #21
0
 /**
  * Sets the location associated with the tracking event such as GPS locator.
  *
  * @param location location string for tracking event
  */
 public void setLocation(String location) {
   operation.setLocation(location);
 }
Example #22
0
 /**
  * Indicates that application tracking event has ended.
  *
  * @param ccode completion code of the tracking event
  * @param rcode reason code associated with this tracking event
  * @param opEx exception associated with this tracking event
  * @see OpCompCode
  */
 public void stop(OpCompCode ccode, int rcode, Throwable opEx) {
   operation.setException(opEx);
   operation.setCompCode(ccode);
   operation.setReasonCode(rcode);
   operation.stop();
 }
Example #23
0
 /**
  * Sets the location associated with the tracking event such as GPS locator.
  *
  * @param location location string for tracking event
  */
 public void setLocation(Source location) {
   operation.setLocation(location);
 }
Example #24
0
 @Override
 public OpType getType() {
   return operation.getType();
 }
Example #25
0
 /**
  * Indicates that application tracking event has started at the specified startTime
  *
  * @param startTimeUsc start time of the tracking event (usec)
  */
 public void start(long startTimeUsc) {
   operation.start(startTimeUsc);
 }
Example #26
0
 @Override
 public void setTTL(long ttl) {
   operation.setTTL(ttl);
 }
Example #27
0
 /** Indicates that application tracking event has started. */
 public void start() {
   operation.start();
 }