public class EventBrokerImpl extends Object implements EventBroker
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_GROUP_VALUE |
static String |
DEFAULT_NAME_VALUE |
Constructor and Description |
---|
EventBrokerImpl() |
EventBrokerImpl(long circuitBreakerThreshold,
boolean advancedStatsOn,
boolean hashedGroupNameOn) |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
void |
clearGroup(String group) |
void |
clearStats() |
step.plugins.events.Event |
findOldestEvent() |
step.plugins.events.Event |
findOldestEventForGroup(String group) |
step.plugins.events.Event |
findYoungestEvent() |
step.plugins.events.Event |
findYoungestEventForGroup(String group) |
step.plugins.events.Event |
get(String id) |
step.plugins.events.Event |
get(String group,
String name)
Now using a sync-free optimistic version of the group lookup as an alternative to syncGroupOn
|
boolean |
getAdvancedStatsOn() |
long |
getCircuitBreakerThreshold() |
long |
getCumulatedAttemptedGets() |
long |
getCumulatedAttemptedGroupGets() |
long |
getCumulatedGets() |
long |
getCumulatedPeeks() |
long |
getCumulatedPuts() |
Set<String> |
getDistinctGroupNames() |
Map<String,Set<step.plugins.events.Event>> |
getFullGroupBasedEventMap() |
Map<String,Set<step.plugins.events.Event>> |
getGroupBasedEventMap(int skip,
int limit) |
Set<step.plugins.events.Event> |
getGroupEvents(String group)
Group access
|
Set<step.plugins.events.Event> |
getGroupEvents(String group,
int skip,
int limit) |
Map<String,Object> |
getGroupStats(String group) |
Map<String,step.plugins.events.Event> |
getIdBasedEventMap() |
Map<String,step.plugins.events.Event> |
getIdBasedEventMap(int skip,
int limit) |
int |
getSize() |
int |
getSizeForGroup(String group) |
int |
getSizeWaterMark()
Not fully reliable due to the nature of CHM
|
Map<String,Object> |
getStats() |
boolean |
isUniqueGroupNameOn() |
step.plugins.events.Event |
peek(String id) |
step.plugins.events.Event |
peek(String group,
String name)
Group primitives, adapted via lookup() to Id primitives
|
step.plugins.events.Event |
put(step.plugins.events.Event event)
Main primitives, based on id
|
void |
setAdvancedStatsOn(boolean statsOn)
Stats
|
void |
setCircuitBreakerThreshold(long circuitBreakerThreshold) |
void |
setUniqueGroupNameOn(boolean hashedGroupNameOn) |
String |
toString() |
public static String DEFAULT_GROUP_VALUE
public static String DEFAULT_NAME_VALUE
public EventBrokerImpl()
public EventBrokerImpl(long circuitBreakerThreshold, boolean advancedStatsOn, boolean hashedGroupNameOn)
public void clear()
clear
in interface EventBroker
public Map<String,step.plugins.events.Event> getIdBasedEventMap()
getIdBasedEventMap
in interface EventBroker
public Map<String,step.plugins.events.Event> getIdBasedEventMap(int skip, int limit)
getIdBasedEventMap
in interface EventBroker
public long getCircuitBreakerThreshold()
getCircuitBreakerThreshold
in interface EventBroker
public void setCircuitBreakerThreshold(long circuitBreakerThreshold)
setCircuitBreakerThreshold
in interface EventBroker
public boolean isUniqueGroupNameOn()
isUniqueGroupNameOn
in interface EventBroker
public void setUniqueGroupNameOn(boolean hashedGroupNameOn)
setUniqueGroupNameOn
in interface EventBroker
public int getSize()
getSize
in interface EventBroker
public step.plugins.events.Event put(step.plugins.events.Event event) throws Exception
put
in interface EventBroker
Exception
public step.plugins.events.Event get(String id)
get
in interface EventBroker
public step.plugins.events.Event peek(String id)
peek
in interface EventBroker
public step.plugins.events.Event peek(String group, String name)
peek
in interface EventBroker
public void clearGroup(String group)
clearGroup
in interface EventBroker
public step.plugins.events.Event get(String group, String name)
get
in interface EventBroker
public void setAdvancedStatsOn(boolean statsOn)
setAdvancedStatsOn
in interface EventBroker
public boolean getAdvancedStatsOn()
getAdvancedStatsOn
in interface EventBroker
public long getCumulatedPuts()
getCumulatedPuts
in interface EventBroker
public long getCumulatedGets()
getCumulatedGets
in interface EventBroker
public long getCumulatedAttemptedGets()
getCumulatedAttemptedGets
in interface EventBroker
public long getCumulatedAttemptedGroupGets()
getCumulatedAttemptedGroupGets
in interface EventBroker
public long getCumulatedPeeks()
getCumulatedPeeks
in interface EventBroker
public Map<String,Object> getStats()
getStats
in interface EventBroker
public Map<String,Object> getGroupStats(String group)
getGroupStats
in interface EventBroker
group
- public int getSizeWaterMark()
getSizeWaterMark
in interface EventBroker
public step.plugins.events.Event findOldestEvent()
findOldestEvent
in interface EventBroker
public step.plugins.events.Event findYoungestEvent()
findYoungestEvent
in interface EventBroker
public int getSizeForGroup(String group)
getSizeForGroup
in interface EventBroker
public step.plugins.events.Event findYoungestEventForGroup(String group)
findYoungestEventForGroup
in interface EventBroker
public step.plugins.events.Event findOldestEventForGroup(String group)
findOldestEventForGroup
in interface EventBroker
public void clearStats()
clearStats
in interface EventBroker
public Set<step.plugins.events.Event> getGroupEvents(String group)
getGroupEvents
in interface EventBroker
public Set<step.plugins.events.Event> getGroupEvents(String group, int skip, int limit)
getGroupEvents
in interface EventBroker
public Map<String,Set<step.plugins.events.Event>> getFullGroupBasedEventMap()
getFullGroupBasedEventMap
in interface EventBroker
public Map<String,Set<step.plugins.events.Event>> getGroupBasedEventMap(int skip, int limit)
getGroupBasedEventMap
in interface EventBroker
public Set<String> getDistinctGroupNames()
getDistinctGroupNames
in interface EventBroker
Copyright © 2020. All rights reserved.