/** * @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; }