/** * @param req Path control request. * @return Affinity key that maps on local node by the time this method is called if replication factor * is {@code 0}, {@code null} otherwise. */ @Nullable private GridUuid affinityKey(GridGgfsPathControlRequest req) { // Do not generate affinity key for replicated or near-only cache. if (!req.colocate()) { if (log.isDebugEnabled()) log.debug("Will not generate affinity key for path control request [ggfsName=" + ggfs.name() + ", req=" + req + ']'); return null; } GridUuid key = ggfs.nextAffinityKey(); if (log.isDebugEnabled()) log.debug("Generated affinity key for path control request [ggfsName=" + ggfs.name() + ", req=" + req + ", key=" + key + ']'); return key; }
/** * @param req Path control request. * @return Affinity key that maps on local node by the time this method is called if replication factor * is {@code 0}, {@code null} otherwise. */ @Nullable private GridUuid affinityKey(GridGgfsPathControlRequest req) { // Do not generate affinity key for replicated or near-only cache. if (!req.colocate()) { if (log.isDebugEnabled()) log.debug("Will not generate affinity key for path control request [ggfsName=" + ggfs.name() + ", req=" + req + ']'); return null; } GridUuid key = ggfs.nextAffinityKey(); if (log.isDebugEnabled()) log.debug("Generated affinity key for path control request [ggfsName=" + ggfs.name() + ", req=" + req + ", key=" + key + ']'); return key; }
writePath(out, req.destinationPath()); out.writeBoolean(req.flag()); out.writeBoolean(req.colocate()); U.writeStringMap(out, req.properties());
writePath(out, req.destinationPath()); out.writeBoolean(req.flag()); out.writeBoolean(req.colocate()); U.writeStringMap(out, req.properties());
req.destinationPath(readPath(in)); req.flag(in.readBoolean()); req.colocate(in.readBoolean()); req.properties(U.readStringMap(in));
req.destinationPath(readPath(in)); req.flag(in.readBoolean()); req.colocate(in.readBoolean()); req.properties(U.readStringMap(in));