Package step.plugins.event
Class InMemoryEventBrokerClient
- java.lang.Object
-
- step.plugins.event.InMemoryEventBrokerClient
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,EventBrokerClient
public class InMemoryEventBrokerClient extends Object implements EventBrokerClient
-
-
Constructor Summary
Constructors Constructor Description InMemoryEventBrokerClient(EventBroker eb)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Boolean>
clear()
Map<String,Boolean>
clearGroup(String group)
Map<String,Object>
clearStats()
void
close()
step.plugins.events.Event
consumeEvent(String id)
step.plugins.events.Event
consumeEventByGroupAndName(String group, String name)
Set<String>
getDistinctGroupNames()
Map<String,Set<step.plugins.events.Event>>
getEventBrokerGroupMap()
Map<String,Set<step.plugins.events.Event>>
getEventBrokerGroupMap(int skip, int limit)
Map<String,step.plugins.events.Event>
getEventBrokerIdMap()
Map<String,step.plugins.events.Event>
getEventBrokerIdMap(int skip, int limit)
Set<step.plugins.events.Event>
getFullGroup(String group)
Map<String,Object>
getGlobalStats()
int
getGroupSize(String group)
Set<step.plugins.events.Event>
getGroupSkipLimit(String group, int skip, int limit)
Map<String,Object>
getGroupStats(String group)
step.plugins.events.Event
peekEvent(String id)
step.plugins.events.Event
peekEventByGroupAndName(String group, String name)
step.plugins.events.Event
putEvent(step.plugins.events.Event event)
Map<String,Object>
setCircuitBreakerThreshold(long circuitBreakerThreshold)
-
-
-
Constructor Detail
-
InMemoryEventBrokerClient
public InMemoryEventBrokerClient(EventBroker eb)
-
-
Method Detail
-
getEventBrokerIdMap
public Map<String,step.plugins.events.Event> getEventBrokerIdMap()
- Specified by:
getEventBrokerIdMap
in interfaceEventBrokerClient
-
getEventBrokerIdMap
public Map<String,step.plugins.events.Event> getEventBrokerIdMap(int skip, int limit)
- Specified by:
getEventBrokerIdMap
in interfaceEventBrokerClient
-
getEventBrokerGroupMap
public Map<String,Set<step.plugins.events.Event>> getEventBrokerGroupMap()
- Specified by:
getEventBrokerGroupMap
in interfaceEventBrokerClient
-
getEventBrokerGroupMap
public Map<String,Set<step.plugins.events.Event>> getEventBrokerGroupMap(int skip, int limit)
- Specified by:
getEventBrokerGroupMap
in interfaceEventBrokerClient
-
putEvent
public step.plugins.events.Event putEvent(step.plugins.events.Event event)
- Specified by:
putEvent
in interfaceEventBrokerClient
-
peekEvent
public step.plugins.events.Event peekEvent(String id)
- Specified by:
peekEvent
in interfaceEventBrokerClient
-
peekEventByGroupAndName
public step.plugins.events.Event peekEventByGroupAndName(String group, String name)
- Specified by:
peekEventByGroupAndName
in interfaceEventBrokerClient
-
consumeEvent
public step.plugins.events.Event consumeEvent(String id)
- Specified by:
consumeEvent
in interfaceEventBrokerClient
-
consumeEventByGroupAndName
public step.plugins.events.Event consumeEventByGroupAndName(String group, String name)
- Specified by:
consumeEventByGroupAndName
in interfaceEventBrokerClient
-
clear
public Map<String,Boolean> clear()
- Specified by:
clear
in interfaceEventBrokerClient
-
clearGroup
public Map<String,Boolean> clearGroup(String group)
- Specified by:
clearGroup
in interfaceEventBrokerClient
-
getGlobalStats
public Map<String,Object> getGlobalStats()
- Specified by:
getGlobalStats
in interfaceEventBrokerClient
-
getGroupStats
public Map<String,Object> getGroupStats(String group)
- Specified by:
getGroupStats
in interfaceEventBrokerClient
-
clearStats
public Map<String,Object> clearStats()
- Specified by:
clearStats
in interfaceEventBrokerClient
-
getGroupSkipLimit
public Set<step.plugins.events.Event> getGroupSkipLimit(String group, int skip, int limit)
- Specified by:
getGroupSkipLimit
in interfaceEventBrokerClient
-
getFullGroup
public Set<step.plugins.events.Event> getFullGroup(String group)
- Specified by:
getFullGroup
in interfaceEventBrokerClient
-
getDistinctGroupNames
public Set<String> getDistinctGroupNames()
- Specified by:
getDistinctGroupNames
in interfaceEventBrokerClient
-
getGroupSize
public int getGroupSize(String group)
- Specified by:
getGroupSize
in interfaceEventBrokerClient
-
setCircuitBreakerThreshold
public Map<String,Object> setCircuitBreakerThreshold(long circuitBreakerThreshold)
- Specified by:
setCircuitBreakerThreshold
in interfaceEventBrokerClient
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
-