Interface RequestTraceStoreInterface

    • Method Detail

      • addTrace

        RequestTrace addTrace​(RequestTrace trace)
        Adds a request trace to the store.
        Parameters:
        trace - the trace to add.
        Returns:
        The trace that was removed, or null if no trace was removed
      • addTrace

        RequestTrace addTrace​(RequestTrace trace,
                              RequestTrace traceToRemove)
        Adds a request trace to the store, removing the specified trace if present and necessary.
        Parameters:
        trace - The trace to add
        traceToRemove - The trace to remove if present
        Returns:
        The trace that was removed, or null if no trace was removed
      • getTraces

        Collection<RequestTrace> getTraces()
        Gets the entire contents of the store.
        Returns:
        every request trace in the store.
      • getTraces

        Collection<RequestTrace> getTraces​(int limit)
        Gets the contents of the store, up to a limit number of items.
        Parameters:
        limit - the maximum number of traces to return.
        Returns:
        up to the limit number of items from the store.
      • setSize

        void setSize​(IntSupplier size)
        Sets the supplier for the maximum size of the store. Any traces added after this size will cause another to be removed. The trace removed depends on the store implementation.
        Parameters:
        size - A supplier for the maximum size of the store.
      • getStoreSize

        int getStoreSize()
        Gets the current size of the store.
        Returns:
        the size of the store.
      • emptyStore

        Collection<RequestTrace> emptyStore()
        Removes all of the traces from the store. The store will be empty after this method is called.
        Returns:
        The traces that were stored
      • isShared

        default boolean isShared()
        Returns:
        true in case of a clustered store, false in case of a local store.