|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.hammurapi.eventbus.AbstractEventBus<E,P,C,Long,AbstractEventBus.Handle<E,P,C,Long>,S>
com.hammurapi.eventbus.local.LocalEventBusBase<E,P,C,S>
E - Event type.P - Handler priority type.C - Context type.K - Registration key type.public class LocalEventBusBase<E,P extends Comparable<P>,C,S extends EventStore<E,P,C,AbstractEventBus.Handle<E,P,C,Long>,S>>
Base class for event bus which functions within JVM boundaries.
| Nested Class Summary | |
|---|---|
static class |
LocalEventBusBase.Config<E,P extends Comparable<P>,C,S extends EventStore<E,P,C,AbstractEventBus.Handle<E,P,C,Long>,S>>
Bus configurator. |
| Nested classes/interfaces inherited from class com.hammurapi.eventbus.AbstractEventBus |
|---|
AbstractEventBus.CreateMasterHandleResult, AbstractEventBus.DerivationEx<K>, AbstractEventBus.Handle<E,P extends Comparable<P>,C,K>, AbstractEventBus.Snapshot<E,P extends Comparable<P>,C,K,H extends EventBus.Handle<E,P,C>,S extends EventStore<E,P,C,H,S>>, AbstractEventBus.StateSnapshot<E,P extends Comparable<P>,C,K,H extends EventBus.Handle<E,P,C>,S extends EventStore<E,P,C,H,S>>, AbstractEventBus.StoreEntry<E,P extends Comparable<P>,C,K> |
| Constructor Summary | |
|---|---|
LocalEventBusBase(LocalEventBusBase.Config<E,P,C,S> config)
|
|
| Method Summary | |
|---|---|
protected TrackingExecutorService |
createExecutorService(boolean oneOff,
String name)
Create a wrapper around the root executor service for task tracking purposes. |
protected TrackingExecutorService |
createExecutorService(ExecutorService master,
boolean oneOff,
String name)
Creates a wrapper around the master executor service for task tracking purposes. |
protected InferenceContext<E,P,C,Long,AbstractEventBus.Handle<E,P,C,Long>,S> |
createInferenceContext()
Creates inference context with zero chain length and no root handle. |
protected TrackingExecutorService |
getExecutorService()
Returns "root" executor service to submit predicate evaluation and handler execution tasks to. |
int |
getMaxDerivationDepth()
|
protected Lock |
getRtcLock()
|
protected AbstractEventBus.Handle<E,P,C,Long> |
newMasterHandle(PostCommand<E,P,C,Long,AbstractEventBus.Handle<E,P,C,Long>,S> postCommand)
Instantiates master handle. |
protected Long |
nextId()
Generates handler ID. |
protected AbstractEventBus.Handle<E,P,C,Long> |
processInferenceCommand(InferenceCommand<E,P,C,Long,AbstractEventBus.Handle<E,P,C,Long>,S> command)
To make it visible to local classes. |
protected void |
processRemoveCommand(RemoveCommand<E,P,C,Long,AbstractEventBus.Handle<E,P,C,Long>,S> command)
|
void |
remove(E event)
Removes event from the bus. |
void |
setMaxDerivationDepth(int maxDerivationDepth)
|
| Methods inherited from class com.hammurapi.eventbus.AbstractEventBus |
|---|
addHandler, createMasterHandle, getDerivations, getEventType, getExceptionHandler, getInferencePolicy, getStore, join, join, manageHandlers, post, removeHandlers, removeHandlers, reset, setExceptionHandler, takeSnapshot, workingMemorySnapshot |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LocalEventBusBase(LocalEventBusBase.Config<E,P,C,S> config)
| Method Detail |
|---|
public int getMaxDerivationDepth()
public void setMaxDerivationDepth(int maxDerivationDepth)
protected TrackingExecutorService createExecutorService(ExecutorService master,
boolean oneOff,
String name)
AbstractEventBus
createExecutorService in class AbstractEventBus<E,P extends Comparable<P>,C,Long,AbstractEventBus.Handle<E,P extends Comparable<P>,C,Long>,S extends EventStore<E,P,C,AbstractEventBus.Handle<E,P,C,Long>,S>>master - Master executor service
protected TrackingExecutorService createExecutorService(boolean oneOff,
String name)
AbstractEventBus
createExecutorService in class AbstractEventBus<E,P extends Comparable<P>,C,Long,AbstractEventBus.Handle<E,P extends Comparable<P>,C,Long>,S extends EventStore<E,P,C,AbstractEventBus.Handle<E,P,C,Long>,S>>protected TrackingExecutorService getExecutorService()
AbstractEventBus
getExecutorService in class AbstractEventBus<E,P extends Comparable<P>,C,Long,AbstractEventBus.Handle<E,P extends Comparable<P>,C,Long>,S extends EventStore<E,P,C,AbstractEventBus.Handle<E,P,C,Long>,S>>protected Long nextId()
AbstractEventBus
nextId in class AbstractEventBus<E,P extends Comparable<P>,C,Long,AbstractEventBus.Handle<E,P extends Comparable<P>,C,Long>,S extends EventStore<E,P,C,AbstractEventBus.Handle<E,P,C,Long>,S>>protected AbstractEventBus.Handle<E,P,C,Long> newMasterHandle(PostCommand<E,P,C,Long,AbstractEventBus.Handle<E,P,C,Long>,S> postCommand)
AbstractEventBus
newMasterHandle in class AbstractEventBus<E,P extends Comparable<P>,C,Long,AbstractEventBus.Handle<E,P extends Comparable<P>,C,Long>,S extends EventStore<E,P,C,AbstractEventBus.Handle<E,P,C,Long>,S>>public void remove(E event)
EventBus
protected Lock getRtcLock()
getRtcLock in class AbstractEventBus<E,P extends Comparable<P>,C,Long,AbstractEventBus.Handle<E,P extends Comparable<P>,C,Long>,S extends EventStore<E,P,C,AbstractEventBus.Handle<E,P,C,Long>,S>>protected AbstractEventBus.Handle<E,P,C,Long> processInferenceCommand(InferenceCommand<E,P,C,Long,AbstractEventBus.Handle<E,P,C,Long>,S> command)
processInferenceCommand in class AbstractEventBus<E,P extends Comparable<P>,C,Long,AbstractEventBus.Handle<E,P extends Comparable<P>,C,Long>,S extends EventStore<E,P,C,AbstractEventBus.Handle<E,P,C,Long>,S>>command - command to be processedprotected InferenceContext<E,P,C,Long,AbstractEventBus.Handle<E,P,C,Long>,S> createInferenceContext()
AbstractEventBus
createInferenceContext in class AbstractEventBus<E,P extends Comparable<P>,C,Long,AbstractEventBus.Handle<E,P extends Comparable<P>,C,Long>,S extends EventStore<E,P,C,AbstractEventBus.Handle<E,P,C,Long>,S>>protected void processRemoveCommand(RemoveCommand<E,P,C,Long,AbstractEventBus.Handle<E,P,C,Long>,S> command)
processRemoveCommand in class AbstractEventBus<E,P extends Comparable<P>,C,Long,AbstractEventBus.Handle<E,P extends Comparable<P>,C,Long>,S extends EventStore<E,P,C,AbstractEventBus.Handle<E,P,C,Long>,S>>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||