GridGgfsBlockKey key = new GridGgfsBlockKey(fileInfo.id(), fileInfo.affinityKey(), fileInfo.evictExclude(), i);
GridGgfsBlockKey key = new GridGgfsBlockKey(fileInfo.id(), fileInfo.affinityKey(), fileInfo.evictExclude(), i);
/** * @param blockIdx Block index. * @param fileInfo File info. * @return Block key. */ public GridGgfsBlockKey blockKey(long blockIdx, GridGgfsFileInfo fileInfo) { if (fileInfo.affinityKey() != null) return new GridGgfsBlockKey(fileInfo.id(), fileInfo.affinityKey(), fileInfo.evictExclude(), blockIdx); if (fileInfo.fileMap() != null) { GridUuid affKey = fileInfo.fileMap().affinityKey(blockIdx * fileInfo.blockSize(), false); return new GridGgfsBlockKey(fileInfo.id(), affKey, fileInfo.evictExclude(), blockIdx); } return new GridGgfsBlockKey(fileInfo.id(), null, fileInfo.evictExclude(), blockIdx); }
/** * @param blockIdx Block index. * @param fileInfo File info. * @return Block key. */ public GridGgfsBlockKey blockKey(long blockIdx, GridGgfsFileInfo fileInfo) { if (fileInfo.affinityKey() != null) return new GridGgfsBlockKey(fileInfo.id(), fileInfo.affinityKey(), fileInfo.evictExclude(), blockIdx); if (fileInfo.fileMap() != null) { GridUuid affKey = fileInfo.fileMap().affinityKey(blockIdx * fileInfo.blockSize(), false); return new GridGgfsBlockKey(fileInfo.id(), affKey, fileInfo.evictExclude(), blockIdx); } return new GridGgfsBlockKey(fileInfo.id(), null, fileInfo.evictExclude(), blockIdx); }
/** * @param fileInfo File info to construct listing entry from. */ public GridGgfsListingEntry(GridGgfsFileInfo fileInfo) { fileId = fileInfo.id(); affKey = fileInfo.affinityKey(); if (fileInfo.isFile()) { blockSize = fileInfo.blockSize(); len = fileInfo.length(); } props = fileInfo.properties(); accessTime = fileInfo.accessTime(); modificationTime = fileInfo.modificationTime(); }
/** * @param fileInfo File info to construct listing entry from. */ public GridGgfsListingEntry(GridGgfsFileInfo fileInfo) { fileId = fileInfo.id(); affKey = fileInfo.affinityKey(); if (fileInfo.isFile()) { blockSize = fileInfo.blockSize(); len = fileInfo.length(); } props = fileInfo.properties(); accessTime = fileInfo.accessTime(); modificationTime = fileInfo.modificationTime(); }
/** * Constructs directory info. * * @param path Path. */ public GridGgfsFileImpl(GridGgfsPath path, GridGgfsFileInfo info, long globalGrpBlockSize) { A.notNull(path, "path"); A.notNull(info, "info"); this.path = path; fileId = info.id(); if (info.isFile()) { blockSize = info.blockSize(); len = info.length(); grpBlockSize = info.affinityKey() == null ? globalGrpBlockSize : info.length() == 0 ? globalGrpBlockSize : info.length(); } props = info.properties(); if (props == null) props = Collections.emptyMap(); accessTime = info.accessTime(); modificationTime = info.modificationTime(); }
/** * Constructs directory info. * * @param path Path. */ public GridGgfsFileImpl(GridGgfsPath path, GridGgfsFileInfo info, long globalGrpBlockSize) { A.notNull(path, "path"); A.notNull(info, "info"); this.path = path; fileId = info.id(); if (info.isFile()) { blockSize = info.blockSize(); len = info.length(); grpBlockSize = info.affinityKey() == null ? globalGrpBlockSize : info.length() == 0 ? globalGrpBlockSize : info.length(); } props = info.properties(); if (props == null) props = Collections.emptyMap(); accessTime = info.accessTime(); modificationTime = info.modificationTime(); }
GridGgfsBlockKey key = new GridGgfsBlockKey(info.id(), info.affinityKey(), info.evictExclude(), grpIdx * grpSize);
if (info.affinityKey() != null) { Collection<GridGgfsBlockLocation> res = new LinkedList<>(); new GridGgfsBlockKey(info.id(), info.affinityKey(), info.evictExclude(), 0)), res);
if (info.affinityKey() != null) { Collection<GridGgfsBlockLocation> res = new LinkedList<>(); new GridGgfsBlockKey(info.id(), info.affinityKey(), info.evictExclude(), 0)), res);
GridGgfsBlockKey key = new GridGgfsBlockKey(info.id(), info.affinityKey(), info.evictExclude(), grpIdx * grpSize);
) { if (fileInfo.affinityKey() != null) return new GridGgfsBlockKey(fileInfo.id(), fileInfo.affinityKey(), fileInfo.evictExclude(), block);
) { if (fileInfo.affinityKey() != null) return new GridGgfsBlockKey(fileInfo.id(), fileInfo.affinityKey(), fileInfo.evictExclude(), block);
ldr.removeData(new GridGgfsBlockKey(fileId, fileInfo.affinityKey(), fileInfo.evictExclude(), block));
ldr.removeData(new GridGgfsBlockKey(fileId, fileInfo.affinityKey(), fileInfo.evictExclude(), block));