public class GridGgfsEvent extends GridEventAdapter
Grid events are used for notification about what happens within the grid. Note that by design GridGain keeps all events generated on the local node locally and it provides APIs for performing a distributed queries across multiple nodes:
GridEvents.remoteQuery(GridPredicate, long, int...) -
asynchronously querying events occurred on the nodes specified, including remote nodes.
GridEvents.localQuery(GridPredicate, int...) -
querying only local events stored on this local node.
GridEvents.localListen(GridPredicate, int...) -
listening to local grid events (events from remote nodes not included).
GridEvents.waitForLocal(GridPredicate, int...).
It is highly recommended to enable only those events that your application logic requires
by using GridConfiguration.getIncludeEventTypes() method in GridGain configuration. Note that certain
events are required for GridGain's internal operations and such events will still be generated but not stored by
event storage SPI if they are disabled in GridGain configuration.
| Constructor and Description |
|---|
GridGgfsEvent(GridGgfsPath path,
GridGgfsPath newPath,
GridNode node,
int type)
Constructs an event instance for path modification event
(
GridEventType.EVT_GGFS_FILE_RENAMED,
GridEventType.EVT_GGFS_DIR_RENAMED). |
GridGgfsEvent(GridGgfsPath path,
GridNode node,
int type)
Constructs an event instance.
|
GridGgfsEvent(GridGgfsPath path,
GridNode node,
int type,
long dataSize)
Constructs an event instance for close events:
(
GridEventType.EVT_GGFS_FILE_CLOSED_READ,
GridEventType.EVT_GGFS_FILE_CLOSED_WRITE). |
GridGgfsEvent(GridGgfsPath path,
GridNode node,
int type,
Map<String,String> meta)
Constructs an event instance for file metadata update events
(
GridEventType.EVT_GGFS_META_UPDATED). |
| Modifier and Type | Method and Description |
|---|---|
long |
dataSize()
Transferred data size for this event.
|
boolean |
isDirectory()
Checks if this is a directory-related event.
|
GridGgfsPath |
newPath()
New file or directory path for this event (used in
GridEventType.EVT_GGFS_FILE_RENAMED event). |
GridGgfsPath |
path()
Path of the file or directory, on which event has occurred.
|
String |
toString() |
Map<String,String> |
updatedMeta()
Updated file metadata properties.
|
compareTo, equals, hashCode, id, localOrder, message, message, name, node, node, shortDisplay, timestamp, type, typepublic GridGgfsEvent(GridGgfsPath path, GridNode node, int type)
path - File or directory path.node - Node.type - Event type.public GridGgfsEvent(GridGgfsPath path, GridGgfsPath newPath, GridNode node, int type)
GridEventType.EVT_GGFS_FILE_RENAMED,
GridEventType.EVT_GGFS_DIR_RENAMED).path - File or directory path.newPath - New file or directory path.node - Node.type - Event type.public GridGgfsEvent(GridGgfsPath path, GridNode node, int type, long dataSize)
GridEventType.EVT_GGFS_FILE_CLOSED_READ,
GridEventType.EVT_GGFS_FILE_CLOSED_WRITE).path - File path.node - Node.type - Event type.dataSize - Transferred data size in bytes.public GridGgfsEvent(GridGgfsPath path, GridNode node, int type, Map<String,String> meta)
GridEventType.EVT_GGFS_META_UPDATED).path - File path.node - Node.type - Event type.meta - Modified properties.public GridGgfsPath path()
@Nullable public GridGgfsPath newPath()
GridEventType.EVT_GGFS_FILE_RENAMED event).null,
if not relevant for this event.public long dataSize()
@Nullable public Map<String,String> updatedMeta()
null,
if not relevant for this event.public boolean isDirectory()
True if this event is directory-related.public String toString()
toString in class GridEventAdapterCopyright © 2014. All rights reserved.