예제 #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);
 }
예제 #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
       + "}";
 }
예제 #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);
 }
예제 #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);
 }
예제 #5
0
 @Override
 public long getTTL() {
   return operation.getTTL();
 }
예제 #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);
 }
예제 #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);
 }
예제 #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);
 }
예제 #9
0
 @Override
 public void setCorrelator(Collection<String> cids) {
   operation.setCorrelator(cids);
 }
예제 #10
0
 @Override
 public void setCorrelator(String... cids) {
   operation.setCorrelator(cids);
 }
예제 #11
0
 /**
  * Return current severity level associated with this event
  *
  * @return severity level
  */
 public OpLevel getSeverity() {
   return operation.getSeverity();
 }
예제 #12
0
 /**
  * Determine if operation was ever stopped
  *
  * @return true if operation was stopped, false otherwise
  */
 public boolean isStopped() {
   return operation.isStopped();
 }
예제 #13
0
 /**
  * Determine if operation was ever started
  *
  * @return true if operation was started, false otherwise
  */
 public boolean isStarted() {
   return operation.isStarted();
 }
예제 #14
0
 /**
  * Returns true of operation is a NOOP
  *
  * @return true if operation is a NOOP, false otherwise
  */
 public boolean isNoop() {
   return operation.isNoop();
 }
예제 #15
0
 /** Indicates that application tracking event has ended. */
 public void stop() {
   operation.stop();
 }
예제 #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);
 }
예제 #17
0
 @Override
 public Set<String> getCorrelator() {
   return operation.getCorrelator();
 }
예제 #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);
 }
예제 #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();
 }
예제 #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);
 }
예제 #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);
 }
예제 #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();
 }
예제 #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);
 }
예제 #24
0
 @Override
 public OpType getType() {
   return operation.getType();
 }
예제 #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);
 }
예제 #26
0
 @Override
 public void setTTL(long ttl) {
   operation.setTTL(ttl);
 }
예제 #27
0
 /** Indicates that application tracking event has started. */
 public void start() {
   operation.start();
 }