コード例 #1
0
  /** {@inheritDoc} */
  @Override
  public void clearAll(
      Collection<? extends K> keys,
      @Nullable GridPredicate<? super GridCacheEntry<K, V>>[] filter) {
    super.clearAll(keys, filter);

    dht.clearAll(keys, filter);
  }
コード例 #2
0
  /** {@inheritDoc} */
  @Override
  public void start() throws GridException {
    super.start();

    ctx.io()
        .addHandler(
            GridNearGetResponse.class,
            new CI2<UUID, GridNearGetResponse<K, V>>() {
              @Override
              public void apply(UUID nodeId, GridNearGetResponse<K, V> res) {
                processGetResponse(nodeId, res);
              }
            });

    ctx.io()
        .addHandler(
            GridNearTxPrepareResponse.class,
            new CI2<UUID, GridNearTxPrepareResponse<K, V>>() {
              @Override
              public void apply(UUID nodeId, GridNearTxPrepareResponse<K, V> res) {
                processPrepareResponse(nodeId, res);
              }
            });

    ctx.io()
        .addHandler(
            GridNearTxFinishResponse.class,
            new CI2<UUID, GridNearTxFinishResponse<K, V>>() {
              @Override
              public void apply(UUID nodeId, GridNearTxFinishResponse<K, V> res) {
                processFinishResponse(nodeId, res);
              }
            });

    ctx.io()
        .addHandler(
            GridNearLockResponse.class,
            new CI2<UUID, GridNearLockResponse<K, V>>() {
              @Override
              public void apply(UUID nodeId, GridNearLockResponse<K, V> res) {
                processLockResponse(nodeId, res);
              }
            });
  }
コード例 #3
0
  /** {@inheritDoc} */
  @Override
  public void reloadAll() throws GridException {
    super.reloadAll();

    dht.reloadAll();
  }
コード例 #4
0
  /** {@inheritDoc} */
  @Override
  public void clearAll(@Nullable GridPredicate<? super GridCacheEntry<K, V>>[] filter) {
    super.clearAll(filter);

    dht.clearAll(filter);
  }
コード例 #5
0
  /** {@inheritDoc} */
  @Override
  public void start() throws GridException {
    super.start();

    GridCacheIoManager<K, V> io = ctx.io();

    io.addHandler(
        GridDistributedLockRequest.class,
        new CI2<UUID, GridDistributedLockRequest<K, V>>() {
          @Override
          public void apply(UUID nodeId, GridDistributedLockRequest<K, V> req) {
            processLockRequest(nodeId, req);
          }
        });

    io.addHandler(
        GridDistributedLockResponse.class,
        new CI2<UUID, GridDistributedLockResponse<K, V>>() {
          @Override
          public void apply(UUID nodeId, GridDistributedLockResponse<K, V> res) {
            processLockResponse(nodeId, res);
          }
        });

    io.addHandler(
        GridDistributedTxFinishRequest.class,
        new CI2<UUID, GridDistributedTxFinishRequest<K, V>>() {
          @Override
          public void apply(UUID nodeId, GridDistributedTxFinishRequest<K, V> req) {
            processFinishRequest(nodeId, req);
          }
        });

    io.addHandler(
        GridDistributedTxFinishResponse.class,
        new CI2<UUID, GridDistributedTxFinishResponse<K, V>>() {
          @Override
          public void apply(UUID nodeId, GridDistributedTxFinishResponse<K, V> res) {
            processFinishResponse(nodeId, res);
          }
        });

    io.addHandler(
        GridDistributedTxPrepareRequest.class,
        new CI2<UUID, GridDistributedTxPrepareRequest<K, V>>() {
          @Override
          public void apply(UUID nodeId, GridDistributedTxPrepareRequest<K, V> req) {
            processPrepareRequest(nodeId, req);
          }
        });

    io.addHandler(
        GridDistributedTxPrepareResponse.class,
        new CI2<UUID, GridDistributedTxPrepareResponse<K, V>>() {
          @Override
          public void apply(UUID nodeId, GridDistributedTxPrepareResponse<K, V> res) {
            processPrepareResponse(nodeId, res);
          }
        });

    io.addHandler(
        GridDistributedUnlockRequest.class,
        new CI2<UUID, GridDistributedUnlockRequest<K, V>>() {
          @Override
          public void apply(UUID nodeId, GridDistributedUnlockRequest<K, V> req) {
            processUnlockRequest(nodeId, req);
          }
        });

    preldr = new GridReplicatedPreloader<K, V>(ctx);

    preldr.start();
  }
コード例 #6
0
  /** {@inheritDoc} */
  @Override
  public void onKernalStop() {
    super.onKernalStop();

    if (preldr != null) preldr.onKernalStop();
  }
コード例 #7
0
  /** {@inheritDoc} */
  @Override
  public void onKernalStart() throws GridException {
    super.onKernalStart();

    if (preldr != null) preldr.onKernalStart();
  }
コード例 #8
0
  /** {@inheritDoc} */
  @Override
  public void stop() {
    super.stop();

    if (preldr != null) preldr.stop();
  }