Interface EventContextDeduplicator


  • public interface EventContextDeduplicator
    Interface for a strategy for removing duplicate contexts from the event stream. This has been factored out of DefaultEventProcessor because the client-side and server-side SDKs behave differently (client-side does not send index events).
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void flush()
      Forgets any cached context information, so all subsequent contexs will be treated as new.
      java.lang.Long getFlushInterval()
      Returns the millisecond interval, if any, at which the event processor should call flush().
      boolean processContext​(com.launchdarkly.sdk.LDContext context)
      Updates the internal state if necessary to reflect that we have seen the given context.
    • Method Detail

      • getFlushInterval

        java.lang.Long getFlushInterval()
        Returns the millisecond interval, if any, at which the event processor should call flush().
        Returns:
        a number of milliseconds, or null if not applicable
      • processContext

        boolean processContext​(com.launchdarkly.sdk.LDContext context)
        Updates the internal state if necessary to reflect that we have seen the given context. Returns true if it is time to insert an index event for this context into the event output.
        Parameters:
        context - a context object
        Returns:
        true if an index event should be emitted
      • flush

        void flush()
        Forgets any cached context information, so all subsequent contexs will be treated as new.