Interface Session


public interface Session
User session.
Since:
0.7
  • Method Details

    • getId

      String getId()

      This session's ID.

      Returns:
      Session ID.
      Since:
      0.7
    • getOwnerId

      Optional<String> getOwnerId()

      This session's owner ID, if proved.

      Returns:
      Owner ID.
      Since:
      1.0
    • getTimestamp

      Instant getTimestamp()

      This session's creation timestamp.

      Returns:
      Creation timestamp.
      Since:
      0.7
    • getTraversedStates

      Map<State,Integer> getTraversedStates()

      The collection of states, traversed by this session so far, and their respective visit counts. For each state S, the visit count in incremented by one whenever all the following conditions are met:

      • The session is targeted for the state S
      • There exists an experiment E, which a) is instrumented on state S, b) is not OFF, and c) this session is qualified for.
      Returns:
      A map, whose entries are keyed by State and values are Integer visit counts in that state.
      Since:
      0.7
    • getSchema

      Schema getSchema()
      The experiment schema, associated with this session.
      Returns:
      An object of type Schema
      Since:
      0.9
    • triggerEvent

      void triggerEvent(TraceEvent event)
      Trigger a custom trace event. The caller supplies an implementation of the TraceEvent interface.
    • getTraversedExperiments

      Set<Experiment> getTraversedExperiments()

      The set of experiments traversed by this session so far. A experiment V is traversed by a session when the session is targeted for a state, which a) is instrumented by V, b) V is not OFF, and c) this session is qualified for V.

      Returns:
      A set of Experiment objects.
      Since:
      0.7
    • getStateRequest

      Optional<StateRequest> getStateRequest()

      The most recent state request, which may be still in progress or already committed or failed.

      Returns:
      An Optional of StateRequest, containing the most recent state request, or empty if this session has not yet been targeted for a state.
      Since:
      0.7
    • getAttributes

      Map<String,String> getAttributes()

      This session's attributes as a mutable map.

      Returns:
      A mutable Map.
      Since:
      0.7