/** * Get the new objects that were sent by the user * * @return the new objects that were sent by the user */ public ObjectIdSubclassMap<ObjectId> getNewObjectIds() { if (newObjectIds != null) return newObjectIds; return new ObjectIdSubclassMap<>(); }
/** * Get set of objects the incoming pack assumed for delta purposes * * @return set of objects the incoming pack assumed for delta purposes */ public ObjectIdSubclassMap<ObjectId> getBaseObjectIds() { if (baseObjectIds != null) return baseObjectIds; return new ObjectIdSubclassMap<>(); }
/** * Configure this index pack instance to keep track of new objects. * <p> * By default an index pack doesn't save the new objects that were created * when it was instantiated. Setting this flag to {@code true} allows the * caller to use {@link #getNewObjectIds()} to retrieve that list. * * @param b * {@code true} to enable keeping track of new objects. */ public void setNeedNewObjectIds(boolean b) { if (b) newObjectIds = new ObjectIdSubclassMap<>(); else newObjectIds = null; }
/** @return the new objects that were sent by the user */ public ObjectIdSubclassMap<ObjectId> getNewObjectIds() { if (newObjectIds != null) return newObjectIds; return new ObjectIdSubclassMap<ObjectId>(); }
/** @return set of objects the incoming pack assumed for delta purposes */ public ObjectIdSubclassMap<ObjectId> getBaseObjectIds() { if (baseObjectIds != null) return baseObjectIds; return new ObjectIdSubclassMap<ObjectId>(); }
/** * Get the new objects that were sent by the user * * @return the new objects that were sent by the user */ public ObjectIdSubclassMap<ObjectId> getNewObjectIds() { if (newObjectIds != null) return newObjectIds; return new ObjectIdSubclassMap<>(); }
/** * Get set of objects the incoming pack assumed for delta purposes * * @return set of objects the incoming pack assumed for delta purposes */ public ObjectIdSubclassMap<ObjectId> getBaseObjectIds() { if (baseObjectIds != null) return baseObjectIds; return new ObjectIdSubclassMap<>(); }
refs = new Section(REF_BLOCK_TYPE); if (indexObjects) { obj2ref = new ObjectIdSubclassMap<>();
/** * Configure this index pack instance to keep track of new objects. * <p> * By default an index pack doesn't save the new objects that were created * when it was instantiated. Setting this flag to {@code true} allows the * caller to use {@link #getNewObjectIds()} to retrieve that list. * * @param b * {@code true} to enable keeping track of new objects. */ public void setNeedNewObjectIds(boolean b) { if (b) newObjectIds = new ObjectIdSubclassMap<>(); else newObjectIds = null; }
/** * Configure this index pack instance to keep track of new objects. * <p> * By default an index pack doesn't save the new objects that were created * when it was instantiated. Setting this flag to {@code true} allows the * caller to use {@link #getNewObjectIds()} to retrieve that list. * * @param b * {@code true} to enable keeping track of new objects. */ public void setNeedNewObjectIds(boolean b) { if (b) newObjectIds = new ObjectIdSubclassMap<ObjectId>(); else newObjectIds = null; }
baseObjectIds = new ObjectIdSubclassMap<>();
treeParser = new CanonicalTreeParser(); idBuffer = new MutableObjectId(); objectMap = new ObjectIdSubclassMap<DhtInfo>();
treeParser = new CanonicalTreeParser(); idBuffer = new MutableObjectId(); objectMap = new ObjectIdSubclassMap<DhtInfo>();
refs = new Section(REF_BLOCK_TYPE); if (indexObjects) { obj2ref = new ObjectIdSubclassMap<>();
baseObjectIds = new ObjectIdSubclassMap<ObjectId>();
baseObjectIds = new ObjectIdSubclassMap<>();
private RefCache read() throws DhtException, TimeoutException { RefList.Builder<DhtRef> id = new RefList.Builder<DhtRef>(); RefList.Builder<DhtRef> sym = new RefList.Builder<DhtRef>(); ObjectIdSubclassMap<IdWithChunk> hints = new ObjectIdSubclassMap<IdWithChunk>(); for (Map.Entry<RefKey, RefData> e : scan()) { DhtRef ref = fromData(e.getKey().getName(), e.getValue()); if (ref.isSymbolic()) sym.add(ref); id.add(ref); if (ref.getObjectId() instanceof IdWithChunk && !hints.contains(ref.getObjectId())) hints.add((IdWithChunk) ref.getObjectId()); if (ref.getPeeledObjectId() instanceof IdWithChunk && !hints.contains(ref.getPeeledObjectId())) hints.add((IdWithChunk) ref.getPeeledObjectId()); } id.sort(); sym.sort(); return new RefCache(id.toRefList(), sym.toRefList(), hints); }
private RefCache read() throws DhtException, TimeoutException { RefList.Builder<DhtRef> id = new RefList.Builder<DhtRef>(); RefList.Builder<DhtRef> sym = new RefList.Builder<DhtRef>(); ObjectIdSubclassMap<IdWithChunk> hints = new ObjectIdSubclassMap<IdWithChunk>(); for (Map.Entry<RefKey, RefData> e : scan()) { DhtRef ref = fromData(e.getKey().getName(), e.getValue()); if (ref.isSymbolic()) sym.add(ref); id.add(ref); if (ref.getObjectId() instanceof IdWithChunk && !hints.contains(ref.getObjectId())) hints.add((IdWithChunk) ref.getObjectId()); if (ref.getPeeledObjectId() instanceof IdWithChunk && !hints.contains(ref.getPeeledObjectId())) hints.add((IdWithChunk) ref.getPeeledObjectId()); } id.sort(); sym.sort(); return new RefCache(id.toRefList(), sym.toRefList(), hints); }