public class GridEventStorageManager extends GridManagerAdapter<EventStorageSpi>
GridComponent.DiscoveryDataExchangeTypectx, log| Constructor and Description |
|---|
GridEventStorageManager(GridKernalContext ctx) |
| Modifier and Type | Method and Description |
|---|---|
void |
addLocalEventListener(GridLocalEventListener lsnr,
int[] types)
Adds local event listener.
|
void |
addLocalEventListener(GridLocalEventListener lsnr,
int type,
int... types)
Adds local event listener.
|
void |
addLocalEventListener(IgnitePredicate<? extends Event> lsnr,
int[] types)
Adds local user event listener.
|
void |
disableEvents(int[] types)
Disables provided events.
|
int[] |
enabledEvents()
Gets types of enabled user-recordable events.
|
void |
enableEvents(int[] types)
Enables provided events.
|
boolean |
isAllUserRecordable(int[] types)
Checks whether all provided events are user-recordable.
|
boolean |
isRecordable(int type)
Checks whether this event type should be recorded.
|
boolean |
isUserRecordable(int type)
Checks if the event type is user-recordable.
|
<T extends Event> |
localEvents(IgnitePredicate<T> p) |
void |
onKernalStop0(boolean cancel) |
void |
printMemoryStats()
Prints memory statistics (sizes of internal structures, etc.).
|
void |
record(Event evt)
Records event if it's recordable.
|
<T extends Event> |
remoteEventsAsync(IgnitePredicate<T> p,
Collection<? extends ClusterNode> nodes,
long timeout) |
boolean |
removeLocalEventListener(GridLocalEventListener lsnr,
int... types)
Removes listener for specified events, if any.
|
boolean |
removeLocalEventListener(IgnitePredicate<? extends Event> lsnr,
int... types)
Removes user listener for specified events, if any.
|
void |
start()
Starts grid component.
|
void |
stop(boolean cancel)
Stops grid component.
|
<T extends Event> |
waitForEvent(IgnitePredicate<T> p,
int... types) |
Event |
waitForEvent(long timeout,
Runnable c,
IgnitePredicate<? super Event> p,
int... types) |
assertParameter, collectDiscoveryData, discoveryDataType, enabled, getSpi, getSpi, getSpis, onAfterSpiStart, onBeforeSpiStart, onDiscoveryDataReceived, onKernalStart, onKernalStart0, onKernalStop, startInfo, startSpi, stopInfo, stopSpi, toString, validateNodepublic GridEventStorageManager(GridKernalContext ctx)
ctx - Kernal context.public void printMemoryStats()
printMemoryStats in interface GridComponentprintMemoryStats in class GridManagerAdapter<EventStorageSpi>public void onKernalStop0(boolean cancel)
onKernalStop0 in class GridManagerAdapter<EventStorageSpi>cancel - Cancel flag.public void stop(boolean cancel)
throws IgniteCheckedException
cancel - If true, then all ongoing tasks or jobs for relevant
components need to be cancelled.IgniteCheckedException - Thrown in case of any errors.public void start()
throws IgniteCheckedException
IgniteCheckedException - Throws in case of any errors.public void record(Event evt)
evt - Event to record.public int[] enabledEvents()
public void enableEvents(int[] types)
types - Events to enable.public void disableEvents(int[] types)
types - Events to disable.public boolean isUserRecordable(int type)
type - Event type to check.true if passed event should be recorded, false - otherwise.public boolean isRecordable(int type)
type - Event type to check.public boolean isAllUserRecordable(int[] types)
Note that this method supports only predefined Ignite events.
types - Event types.IllegalArgumentException - If types contains user event type.public void addLocalEventListener(IgnitePredicate<? extends Event> lsnr, int[] types)
lsnr - User listener to add.types - Event types to subscribe listener for.public void addLocalEventListener(GridLocalEventListener lsnr, int[] types)
lsnr - Listener to add.types - Event types to subscribe listener for.public void addLocalEventListener(GridLocalEventListener lsnr, int type, @Nullable int... types)
lsnr - Listener to add.type - Event type to subscribe listener for.types - Additional event types to subscribe listener for.public boolean removeLocalEventListener(IgnitePredicate<? extends Event> lsnr, @Nullable int... types)
lsnr - User listener predicate.types - Event types.true if removed.public boolean removeLocalEventListener(GridLocalEventListener lsnr, @Nullable int... types)
lsnr - Listener.types - Event types.true if removed.public <T extends Event> IgniteInternalFuture<T> waitForEvent(@Nullable IgnitePredicate<T> p, @Nullable int... types)
p - Optional predicate.types - Event types to wait for.public Event waitForEvent(long timeout, @Nullable Runnable c, @Nullable IgnitePredicate<? super Event> p, int... types) throws IgniteCheckedException
timeout - Timeout.c - Optional continuation.p - Optional predicate.types - Event types to wait for.IgniteCheckedException - Thrown in case of any errors.public <T extends Event> Collection<T> localEvents(IgnitePredicate<T> p)
p - Grid event predicate.public <T extends Event> IgniteInternalFuture<List<T>> remoteEventsAsync(IgnitePredicate<T> p, Collection<? extends ClusterNode> nodes, long timeout)
p - Grid event predicate.nodes - Collection of nodes.timeout - Maximum time to wait for result, if 0, then wait until result is received.
Follow @ApacheIgnite
Ignite Fabric : ver. 1.1.0-incubating Release Date : May 20 2015