com.h3c.sdn.trace

## Interface TraceService

-     public interface TraceService

  API to access controller TX/RX tracing functionality.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clear()` Clears the entire store trace.
    `long` | `getBookmark()` Returns the current bookmark value.
    `Trace` | `getTrace(long bookmark)` Returns the trace descriptor with message events recorded since the specified bookmark.
    `Trace` | `getTraceOrWait(long bookmark, long maxWaitMillis)` Returns the trace descriptor with the message events recorded since the specified bookmark.
    `boolean` | `recording()` Returns the current recording status of the OpenFlow controller.
    `boolean` | `start()` Starts trace recording for the default time period.
    `boolean` | `start(int seconds)` Starts recording for the specified number of seconds.
    `void` | `stop()` Stops recording immediately.

- - ### Method Detail

    - #### recording

          boolean recording()

      Returns the current recording status of the OpenFlow controller.
      Returns:
        `true` if recording is active, `false` otherwise

    - #### getBookmark

          long getBookmark()

      Returns the current bookmark value.
      Returns:
        the earliest bookmark value

    - #### start

          boolean start()

      Starts trace recording for the default time period.
      Returns:
        `true` if recording is successfully started, `false` otherwise

    - #### start

          boolean start(int seconds)

      Starts recording for the specified number of seconds. Number of seconds will be limited to a pre-configured maximum.
      Parameters:
        `seconds` - duration of recording in seconds
      Returns:
        `true` if recording is successfully started, `false` otherwise

    - #### stop

          void stop()

      Stops recording immediately.

    - #### clear

          void clear()

      Clears the entire store trace. If recording, there will be no effect on current recording state.

    - #### getTrace

          Trace getTrace(long bookmark)

      Returns the trace descriptor with message events recorded since the specified bookmark. If there are no message events since the specified bookmark, the trace message event list will be empty.
      Parameters:
        `bookmark` - identification bookmark
      Returns:
        trace since the specified bookmark

    - #### getTraceOrWait

          Trace getTraceOrWait(long bookmark,
                             long maxWaitMillis)

      Returns the trace descriptor with the message events recorded since the specified bookmark. If there are no messages events since the specified bookmark, the thread will block until either a new message event occurs or the specified maximum wait time.
      Parameters:
        `bookmark` - identification bookmark
        `maxWaitMillis` - the maximum time in milliseconds to wait for the arrival of a new message event
      Returns:
        trace since the specified bookmark

Copyright © 2014. All Rights Reserved.