Class EventBrokerImpl

  • All Implemented Interfaces:
    EventBroker

    public class EventBrokerImpl
    extends java.lang.Object
    implements EventBroker
    • Field Detail

      • DEFAULT_GROUP_VALUE

        public static java.lang.String DEFAULT_GROUP_VALUE
      • DEFAULT_NAME_VALUE

        public static java.lang.String DEFAULT_NAME_VALUE
    • Constructor Detail

      • EventBrokerImpl

        public EventBrokerImpl()
      • EventBrokerImpl

        public EventBrokerImpl​(long circuitBreakerThreshold,
                               boolean advancedStatsOn,
                               boolean hashedGroupNameOn)
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getIdBasedEventMap

        public java.util.Map<java.lang.String,​step.plugins.events.Event> getIdBasedEventMap()
        Specified by:
        getIdBasedEventMap in interface EventBroker
      • getIdBasedEventMap

        public java.util.Map<java.lang.String,​step.plugins.events.Event> getIdBasedEventMap​(int skip,
                                                                                                  int limit)
        Specified by:
        getIdBasedEventMap in interface EventBroker
      • put

        public step.plugins.events.Event put​(step.plugins.events.Event event)
                                      throws java.lang.Exception
        Main primitives, based on id
        Specified by:
        put in interface EventBroker
        Throws:
        java.lang.Exception
      • get

        public step.plugins.events.Event get​(java.lang.String id)
        Specified by:
        get in interface EventBroker
      • peek

        public step.plugins.events.Event peek​(java.lang.String id)
        Specified by:
        peek in interface EventBroker
      • peek

        public step.plugins.events.Event peek​(java.lang.String group,
                                              java.lang.String name)
        Group primitives, adapted via lookup() to Id primitives
        Specified by:
        peek in interface EventBroker
      • clearGroup

        public void clearGroup​(java.lang.String group)
        Specified by:
        clearGroup in interface EventBroker
      • get

        public step.plugins.events.Event get​(java.lang.String group,
                                             java.lang.String name)
        Now using a sync-free optimistic version of the group lookup as an alternative to syncGroupOn
        Specified by:
        get in interface EventBroker
      • getStats

        public java.util.Map<java.lang.String,​java.lang.Object> getStats()
        Specified by:
        getStats in interface EventBroker
      • getGroupStats

        public java.util.Map<java.lang.String,​java.lang.Object> getGroupStats​(java.lang.String group)
        Specified by:
        getGroupStats in interface EventBroker
        Parameters:
        group -
        Returns:
      • getSizeWaterMark

        public int getSizeWaterMark()
        Not fully reliable due to the nature of CHM
        Specified by:
        getSizeWaterMark in interface EventBroker
      • getSizeForGroup

        public int getSizeForGroup​(java.lang.String group)
        Specified by:
        getSizeForGroup in interface EventBroker
      • findYoungestEventForGroup

        public step.plugins.events.Event findYoungestEventForGroup​(java.lang.String group)
        Specified by:
        findYoungestEventForGroup in interface EventBroker
      • findOldestEventForGroup

        public step.plugins.events.Event findOldestEventForGroup​(java.lang.String group)
        Specified by:
        findOldestEventForGroup in interface EventBroker
      • getGroupEvents

        public java.util.Set<step.plugins.events.Event> getGroupEvents​(java.lang.String group)
        Group access
        Specified by:
        getGroupEvents in interface EventBroker
      • getGroupEvents

        public java.util.Set<step.plugins.events.Event> getGroupEvents​(java.lang.String group,
                                                                       int skip,
                                                                       int limit)
        Specified by:
        getGroupEvents in interface EventBroker
      • getFullGroupBasedEventMap

        public java.util.Map<java.lang.String,​java.util.Set<step.plugins.events.Event>> getFullGroupBasedEventMap()
        Specified by:
        getFullGroupBasedEventMap in interface EventBroker
      • getGroupBasedEventMap

        public java.util.Map<java.lang.String,​java.util.Set<step.plugins.events.Event>> getGroupBasedEventMap​(int skip,
                                                                                                                    int limit)
        Specified by:
        getGroupBasedEventMap in interface EventBroker