public class GridEventStorageManager extends GridManagerAdapter<GridEventStorageSpi>
ctx, 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(GridPredicate<? extends GridEvent> 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 GridEvent> |
localEvents(GridPredicate<T> p) |
void |
onKernalStop0(boolean cancel) |
void |
printMemoryStats()
Prints memory statistics (sizes of internal structures, etc.).
|
void |
record(GridEvent evt)
Records event if it's recordable.
|
<T extends GridEvent> |
remoteEventsAsync(GridPredicate<T> p,
Collection<? extends GridNode> nodes,
long timeout) |
boolean |
removeLocalEventListener(GridLocalEventListener lsnr,
int... types)
Removes listener for specified events, if any.
|
boolean |
removeLocalEventListener(GridPredicate<? extends GridEvent> 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 GridEvent> |
waitForEvent(GridPredicate<T> p,
int... types) |
GridEvent |
waitForEvent(long timeout,
Runnable c,
GridPredicate<? super GridEvent> p,
int... types) |
addSpiAttributes, assertParameter, collectDiscoveryData, enabled, getSpi, getSpi, getSpis, 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<GridEventStorageSpi>public void onKernalStop0(boolean cancel)
onKernalStop0 in class GridManagerAdapter<GridEventStorageSpi>cancel - Cancel flag.public void stop(boolean cancel)
throws GridException
cancel - If true, then all ongoing tasks or jobs for relevant
components need to be cancelled.GridException - Thrown in case of any errors.public void start()
throws GridException
GridException - Throws in case of any errors.public void record(GridEvent 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 GridGain events.
types - Event types.IllegalArgumentException - If types contains user event type.public void addLocalEventListener(GridPredicate<? extends GridEvent> 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(GridPredicate<? extends GridEvent> 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 GridEvent> GridFuture<T> waitForEvent(@Nullable GridPredicate<T> p, @Nullable int... types)
p - Optional predicate.types - Event types to wait for.public GridEvent waitForEvent(long timeout, @Nullable Runnable c, @Nullable GridPredicate<? super GridEvent> p, int... types) throws GridException
timeout - Timeout.c - Optional continuation.p - Optional predicate.types - Event types to wait for.GridException - Thrown in case of any errors.public <T extends GridEvent> Collection<T> localEvents(GridPredicate<T> p)
p - Grid event predicate.public <T extends GridEvent> GridFuture<List<T>> remoteEventsAsync(GridPredicate<T> p, Collection<? extends GridNode> 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.Copyright © 2014. All rights reserved.