Search in sources :

Example 6 with GridEventStorageManager

use of org.apache.ignite.internal.managers.eventstorage.GridEventStorageManager in project ignite by apache.

the class IgfsUtils method sendEvents.

/**
     * Sends a series of event.
     *
     * @param kernalCtx Kernal context.
     * @param path The path of the created file.
     * @param newPath New path.
     * @param type The type of event to send.
     */
public static void sendEvents(GridKernalContext kernalCtx, IgfsPath path, IgfsPath newPath, int type) {
    assert kernalCtx != null;
    assert path != null;
    GridEventStorageManager evts = kernalCtx.event();
    ClusterNode locNode = kernalCtx.discovery().localNode();
    if (evts.isRecordable(type)) {
        if (newPath == null)
            evts.record(new IgfsEvent(path, locNode, type));
        else
            evts.record(new IgfsEvent(path, newPath, locNode, type));
    }
}
Also used : GridEventStorageManager(org.apache.ignite.internal.managers.eventstorage.GridEventStorageManager) ClusterNode(org.apache.ignite.cluster.ClusterNode) IgfsEvent(org.apache.ignite.events.IgfsEvent)

Aggregations

GridEventStorageManager (org.apache.ignite.internal.managers.eventstorage.GridEventStorageManager)6 IgfsEvent (org.apache.ignite.events.IgfsEvent)3 IgniteCheckedException (org.apache.ignite.IgniteCheckedException)2 ClusterNode (org.apache.ignite.cluster.ClusterNode)2 EOFException (java.io.EOFException)1 IOException (java.io.IOException)1 RuntimeMXBean (java.lang.management.RuntimeMXBean)1 DecimalFormat (java.text.DecimalFormat)1 ThreadPoolExecutor (java.util.concurrent.ThreadPoolExecutor)1 IgniteClientDisconnectedException (org.apache.ignite.IgniteClientDisconnectedException)1 IgniteException (org.apache.ignite.IgniteException)1 ClusterMetrics (org.apache.ignite.cluster.ClusterMetrics)1 IgfsCorruptedFileException (org.apache.ignite.igfs.IgfsCorruptedFileException)1 IgfsPathNotFoundException (org.apache.ignite.igfs.IgfsPathNotFoundException)1 GridManager (org.apache.ignite.internal.managers.GridManager)1 GridCheckpointManager (org.apache.ignite.internal.managers.checkpoint.GridCheckpointManager)1 GridCollisionManager (org.apache.ignite.internal.managers.collision.GridCollisionManager)1 GridIoManager (org.apache.ignite.internal.managers.communication.GridIoManager)1 GridDeploymentManager (org.apache.ignite.internal.managers.deployment.GridDeploymentManager)1 GridDiscoveryManager (org.apache.ignite.internal.managers.discovery.GridDiscoveryManager)1