use of org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPreloader in project ignite by apache.
the class GridDhtTransactionalCacheAdapter method start.
/** {@inheritDoc} */
@Override
public void start() throws IgniteCheckedException {
super.start();
preldr = new GridDhtPreloader(ctx);
preldr.start();
ctx.io().addHandler(ctx.cacheId(), GridNearGetRequest.class, new CI2<UUID, GridNearGetRequest>() {
@Override
public void apply(UUID nodeId, GridNearGetRequest req) {
processNearGetRequest(nodeId, req);
}
});
ctx.io().addHandler(ctx.cacheId(), GridNearSingleGetRequest.class, new CI2<UUID, GridNearSingleGetRequest>() {
@Override
public void apply(UUID nodeId, GridNearSingleGetRequest req) {
processNearSingleGetRequest(nodeId, req);
}
});
ctx.io().addHandler(ctx.cacheId(), GridNearLockRequest.class, new CI2<UUID, GridNearLockRequest>() {
@Override
public void apply(UUID nodeId, GridNearLockRequest req) {
processNearLockRequest(nodeId, req);
}
});
ctx.io().addHandler(ctx.cacheId(), GridDhtLockRequest.class, new CI2<UUID, GridDhtLockRequest>() {
@Override
public void apply(UUID nodeId, GridDhtLockRequest req) {
processDhtLockRequest(nodeId, req);
}
});
ctx.io().addHandler(ctx.cacheId(), GridDhtLockResponse.class, new CI2<UUID, GridDhtLockResponse>() {
@Override
public void apply(UUID nodeId, GridDhtLockResponse req) {
processDhtLockResponse(nodeId, req);
}
});
ctx.io().addHandler(ctx.cacheId(), GridNearUnlockRequest.class, new CI2<UUID, GridNearUnlockRequest>() {
@Override
public void apply(UUID nodeId, GridNearUnlockRequest req) {
processNearUnlockRequest(nodeId, req);
}
});
ctx.io().addHandler(ctx.cacheId(), GridDhtUnlockRequest.class, new CI2<UUID, GridDhtUnlockRequest>() {
@Override
public void apply(UUID nodeId, GridDhtUnlockRequest req) {
processDhtUnlockRequest(nodeId, req);
}
});
}
use of org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPreloader in project ignite by apache.
the class CacheGroupContext method initializeIO.
/**
* Initializes affinity and rebalance I/O handlers.
*/
private void initializeIO() throws IgniteCheckedException {
assert !recoveryMode.get() : "Couldn't initialize I/O handlers, recovery mode is on for group " + this;
if (ccfg.getCacheMode() != LOCAL) {
if (!ctx.kernalContext().clientNode()) {
ctx.io().addCacheGroupHandler(groupId(), GridDhtAffinityAssignmentRequest.class, (IgniteBiInClosure<UUID, GridDhtAffinityAssignmentRequest>) this::processAffinityAssignmentRequest);
}
preldr = new GridDhtPreloader(this);
preldr.start();
} else
preldr = new GridCachePreloaderAdapter(this);
}
Aggregations