FileStore extends AbstractFileStore { @Override public boolean containsSegment(SegmentId id) { try (ShutDownCloser ignored = shutDown.keepAlive()) { return tarFiles.containsSegment(id.getMostSignificantBits(), id.getLeastSignificantBits()); } } FileStore(final FileStoreBuilder builder); Runnable getGCRunner(); GCNodeWriteMonitor getGCNodeWriteMonitor(); int readerCount(); int getSegmentCount(); FileStoreStats getStats(); void flush(); void tryFlush(); void fullGC(); void tailGC(); boolean compactFull(); boolean compactTail(); void cleanup(); @Override void collectBlobReferences(Consumer<String> collector); void cancelGC(); @Override @NotNull SegmentWriter getWriter(); @Override @NotNull TarRevisions getRevisions(); @Override void close(); @Override boolean containsSegment(SegmentId id); @Override @NotNull Segment readSegment(final SegmentId id); @Override void writeSegment(SegmentId id, byte[] buffer, int offset, int length);  }
@Test public void containsSegment() throws Exception { FileStore fileStore = fileStoreBuilder(getFileStoreFolder()).build(); try { SegmentId id = new SegmentId(fileStore, 0, 0); if (fileStore.containsSegment(id)) { fileStore.readSegment(id); } } finally { fileStore.close(); } }