test_class.declarator: store
test_class.modifier: protected
test_class.original_string: protected GarbageCollectableBlobStore store;
test_class.type: GarbageCollectableBlobStore
test_class.var_name: store
test_class.file: oak-blob/src/test/java/org/apache/jackrabbit/oak/spi/blob/AbstractBlobStoreTest.java
test_class.identifier: AbstractBlobStoreTest
test_case.body: @Test
      public void uploadCallback() throws Exception {
          assumeTrue(supportsStatsCollection());
          TestCollector collector = new TestCollector();
          setupCollector(collector);
          int size = 10 * 1024;
          store.writeBlob(randomStream(42, size));
          //For chunked storage the actual stored size is greater than the file size
          assertCollectedSize(collector.size, size);
          assertEquals(1, collector.uploadCount);
      }
test_case.class_method_signature: AbstractBlobStoreTest.uploadCallback()
test_case.full_signature: @Test public void uploadCallback()
test_case.identifier: uploadCallback
test_case.invocations: assumeTrue supportsStatsCollection setupCollector writeBlob randomStream assertCollectedSize assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void uploadCallback()
focal_class.declarator: HASH_ALGORITHM = "SHA-256"
focal_class.modifier: protected static final
focal_class.original_string: protected static final String HASH_ALGORITHM = "SHA-256";
focal_class.type: String
focal_class.var_name: HASH_ALGORITHM
focal_class.declarator: TYPE_DATA = 0
focal_class.modifier: protected static final
focal_class.original_string: protected static final int TYPE_DATA = 0;
focal_class.type: int
focal_class.var_name: TYPE_DATA
focal_class.declarator: TYPE_HASH = 1
focal_class.modifier: protected static final
focal_class.original_string: protected static final int TYPE_HASH = 1;
focal_class.type: int
focal_class.var_name: TYPE_HASH
focal_class.declarator: BLOCK_SIZE_LIMIT = 48
focal_class.modifier: protected static final
focal_class.original_string: protected static final int BLOCK_SIZE_LIMIT = 48;
focal_class.type: int
focal_class.var_name: BLOCK_SIZE_LIMIT
focal_class.declarator: inUse =
          Collections.synchronizedMap(new WeakHashMap<String, WeakReference<String>>())
focal_class.modifier: protected
focal_class.original_string: protected Map<String, WeakReference<String>> inUse =
          Collections.synchronizedMap(new WeakHashMap<String, WeakReference<String>>());
focal_class.type: Map<String, WeakReference<String>>
focal_class.var_name: inUse
focal_class.declarator: blockSizeMin = 4096
focal_class.modifier: private
focal_class.original_string: private int blockSizeMin = 4096;
focal_class.type: int
focal_class.var_name: blockSizeMin
focal_class.declarator: blockSize = 2 * 1024 * 1024
focal_class.modifier: private
focal_class.original_string: private int blockSize = 2 * 1024 * 1024;
focal_class.type: int
focal_class.var_name: blockSize
focal_class.declarator: blockBuffer = new AtomicReference<byte[]>()
focal_class.modifier: private
focal_class.original_string: private AtomicReference<byte[]> blockBuffer = new AtomicReference<byte[]>();
focal_class.type: AtomicReference<byte[]>
focal_class.var_name: blockBuffer
focal_class.declarator: ALGORITHM = "HmacSHA1"
focal_class.modifier: private static final
focal_class.original_string: private static final String ALGORITHM = "HmacSHA1";
focal_class.type: String
focal_class.var_name: ALGORITHM
focal_class.declarator: referenceKey
focal_class.modifier: private
focal_class.original_string: private byte[] referenceKey;
focal_class.type: byte[]
focal_class.var_name: referenceKey
focal_class.declarator: log = LoggerFactory.getLogger(getClass())
focal_class.modifier: private final
focal_class.original_string: private final Logger log = LoggerFactory.getLogger(getClass());
focal_class.type: Logger
focal_class.var_name: log
focal_class.declarator: statsCollector = BlobStatsCollector.NOOP
focal_class.modifier: private
focal_class.original_string: private BlobStatsCollector statsCollector = BlobStatsCollector.NOOP;
focal_class.type: BlobStatsCollector
focal_class.var_name: statsCollector
focal_class.file: oak-blob/src/main/java/org/apache/jackrabbit/oak/spi/blob/AbstractBlobStore.java
focal_class.identifier: AbstractBlobStore
focal_class.interfaces: implements GarbageCollectableBlobStore,
          Cache.Backend<AbstractBlobStore.BlockId, AbstractBlobStore.Data>
focal_class.class_method_signature: AbstractBlobStore.setBlockSizeMin(int x)
focal_class.full_signature: public void setBlockSizeMin(int x)
focal_class.identifier: setBlockSizeMin
focal_class.modifiers: public
focal_class.parameters: (int x)
focal_class.return: void
focal_class.signature: void setBlockSizeMin(int x)
focal_class.class_method_signature: AbstractBlobStore.getBlockSizeMin()
focal_class.full_signature: @Override public long getBlockSizeMin()
focal_class.identifier: getBlockSizeMin
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: long
focal_class.signature: long getBlockSizeMin()
focal_class.class_method_signature: AbstractBlobStore.setBlockSize(int x)
focal_class.full_signature: @Override public void setBlockSize(int x)
focal_class.identifier: setBlockSize
focal_class.modifiers: @Override public
focal_class.parameters: (int x)
focal_class.return: void
focal_class.signature: void setBlockSize(int x)
focal_class.class_method_signature: AbstractBlobStore.setStatsCollector(BlobStatsCollector stats)
focal_class.full_signature: public void setStatsCollector(BlobStatsCollector stats)
focal_class.identifier: setStatsCollector
focal_class.modifiers: public
focal_class.parameters: (BlobStatsCollector stats)
focal_class.return: void
focal_class.signature: void setStatsCollector(BlobStatsCollector stats)
focal_class.class_method_signature: AbstractBlobStore.getStatsCollector()
focal_class.full_signature: protected BlobStatsCollector getStatsCollector()
focal_class.identifier: getStatsCollector
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: BlobStatsCollector
focal_class.signature: BlobStatsCollector getStatsCollector()
focal_class.class_method_signature: AbstractBlobStore.validateBlockSize(int x)
focal_class.full_signature: private static void validateBlockSize(int x)
focal_class.identifier: validateBlockSize
focal_class.modifiers: private static
focal_class.parameters: (int x)
focal_class.return: void
focal_class.signature: void validateBlockSize(int x)
focal_class.class_method_signature: AbstractBlobStore.getBlockSize()
focal_class.full_signature: public int getBlockSize()
focal_class.identifier: getBlockSize
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getBlockSize()
focal_class.class_method_signature: AbstractBlobStore.writeBlob(String tempFilePath)
focal_class.full_signature: @Override public String writeBlob(String tempFilePath)
focal_class.identifier: writeBlob
focal_class.modifiers: @Override public
focal_class.parameters: (String tempFilePath)
focal_class.return: String
focal_class.signature: String writeBlob(String tempFilePath)
focal_class.class_method_signature: AbstractBlobStore.writeBlob(InputStream in)
focal_class.full_signature: @Override public String writeBlob(InputStream in)
focal_class.identifier: writeBlob
focal_class.modifiers: @Override public
focal_class.parameters: (InputStream in)
focal_class.return: String
focal_class.signature: String writeBlob(InputStream in)
focal_class.class_method_signature: AbstractBlobStore.writeBlob(InputStream in, BlobOptions options)
focal_class.full_signature: @Override public String writeBlob(InputStream in, BlobOptions options)
focal_class.identifier: writeBlob
focal_class.modifiers: @Override public
focal_class.parameters: (InputStream in, BlobOptions options)
focal_class.return: String
focal_class.signature: String writeBlob(InputStream in, BlobOptions options)
focal_class.class_method_signature: AbstractBlobStore.getInputStream(String blobId)
focal_class.full_signature: @Override public InputStream getInputStream(String blobId)
focal_class.identifier: getInputStream
focal_class.modifiers: @Override public
focal_class.parameters: (String blobId)
focal_class.return: InputStream
focal_class.signature: InputStream getInputStream(String blobId)
focal_class.class_method_signature: AbstractBlobStore.getReference(@NotNull String blobId)
focal_class.full_signature: @Override public String getReference(@NotNull String blobId)
focal_class.identifier: getReference
focal_class.modifiers: @Override public
focal_class.parameters: (@NotNull String blobId)
focal_class.return: String
focal_class.signature: String getReference(@NotNull String blobId)
focal_class.class_method_signature: AbstractBlobStore.getBlobId(@NotNull String reference)
focal_class.full_signature: @Override public String getBlobId(@NotNull String reference)
focal_class.identifier: getBlobId
focal_class.modifiers: @Override public
focal_class.parameters: (@NotNull String reference)
focal_class.return: String
focal_class.signature: String getBlobId(@NotNull String reference)
focal_class.class_method_signature: AbstractBlobStore.getOrCreateReferenceKey()
focal_class.full_signature: protected byte[] getOrCreateReferenceKey()
focal_class.identifier: getOrCreateReferenceKey
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: byte[]
focal_class.signature: byte[] getOrCreateReferenceKey()
focal_class.class_method_signature: AbstractBlobStore.getReferenceKey()
focal_class.full_signature: private synchronized byte[] getReferenceKey()
focal_class.identifier: getReferenceKey
focal_class.modifiers: private synchronized
focal_class.parameters: ()
focal_class.return: byte[]
focal_class.signature: byte[] getReferenceKey()
focal_class.class_method_signature: AbstractBlobStore.setReferenceKey(byte[] referenceKey)
focal_class.full_signature: public void setReferenceKey(byte[] referenceKey)
focal_class.identifier: setReferenceKey
focal_class.modifiers: public
focal_class.parameters: (byte[] referenceKey)
focal_class.return: void
focal_class.signature: void setReferenceKey(byte[] referenceKey)
focal_class.class_method_signature: AbstractBlobStore.setReferenceKeyEncoded(String encodedKey)
focal_class.full_signature: public void setReferenceKeyEncoded(String encodedKey)
focal_class.identifier: setReferenceKeyEncoded
focal_class.modifiers: public
focal_class.parameters: (String encodedKey)
focal_class.return: void
focal_class.signature: void setReferenceKeyEncoded(String encodedKey)
focal_class.class_method_signature: AbstractBlobStore.setReferenceKeyPlainText(String textKey)
focal_class.full_signature: public void setReferenceKeyPlainText(String textKey)
focal_class.identifier: setReferenceKeyPlainText
focal_class.modifiers: public
focal_class.parameters: (String textKey)
focal_class.return: void
focal_class.signature: void setReferenceKeyPlainText(String textKey)
focal_class.class_method_signature: AbstractBlobStore.usesBlobId(String blobId)
focal_class.full_signature: protected void usesBlobId(String blobId)
focal_class.identifier: usesBlobId
focal_class.modifiers: protected
focal_class.parameters: (String blobId)
focal_class.return: void
focal_class.signature: void usesBlobId(String blobId)
focal_class.class_method_signature: AbstractBlobStore.clearInUse()
focal_class.full_signature: @Override public void clearInUse()
focal_class.identifier: clearInUse
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void clearInUse()
focal_class.class_method_signature: AbstractBlobStore.convertBlobToId(InputStream in,
              ByteArrayOutputStream idStream, int level, long totalLength)
focal_class.full_signature: private void convertBlobToId(InputStream in,
              ByteArrayOutputStream idStream, int level, long totalLength)
focal_class.identifier: convertBlobToId
focal_class.modifiers: private
focal_class.parameters: (InputStream in,
              ByteArrayOutputStream idStream, int level, long totalLength)
focal_class.return: void
focal_class.signature: void convertBlobToId(InputStream in,
              ByteArrayOutputStream idStream, int level, long totalLength)
focal_class.class_method_signature: AbstractBlobStore.storeBlock(byte[] digest, int level, byte[] data)
focal_class.full_signature: protected abstract void storeBlock(byte[] digest, int level, byte[] data)
focal_class.identifier: storeBlock
focal_class.modifiers: protected abstract
focal_class.parameters: (byte[] digest, int level, byte[] data)
focal_class.return: void
focal_class.signature: void storeBlock(byte[] digest, int level, byte[] data)
focal_class.class_method_signature: AbstractBlobStore.startMark()
focal_class.full_signature: @Override public abstract void startMark()
focal_class.identifier: startMark
focal_class.modifiers: @Override public abstract
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void startMark()
focal_class.class_method_signature: AbstractBlobStore.sweep()
focal_class.full_signature: @Override public abstract int sweep()
focal_class.identifier: sweep
focal_class.modifiers: @Override public abstract
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int sweep()
focal_class.class_method_signature: AbstractBlobStore.isMarkEnabled()
focal_class.full_signature: protected abstract boolean isMarkEnabled()
focal_class.identifier: isMarkEnabled
focal_class.modifiers: protected abstract
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isMarkEnabled()
focal_class.class_method_signature: AbstractBlobStore.mark(BlockId id)
focal_class.full_signature: protected abstract void mark(BlockId id)
focal_class.identifier: mark
focal_class.modifiers: protected abstract
focal_class.parameters: (BlockId id)
focal_class.return: void
focal_class.signature: void mark(BlockId id)
focal_class.class_method_signature: AbstractBlobStore.markInUse()
focal_class.full_signature: protected void markInUse()
focal_class.identifier: markInUse
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void markInUse()
focal_class.class_method_signature: AbstractBlobStore.readBlob(String blobId, long pos, byte[] buff, int off,
              int length)
focal_class.full_signature: @Override public int readBlob(String blobId, long pos, byte[] buff, int off,
              int length)
focal_class.identifier: readBlob
focal_class.modifiers: @Override public
focal_class.parameters: (String blobId, long pos, byte[] buff, int off,
              int length)
focal_class.return: int
focal_class.signature: int readBlob(String blobId, long pos, byte[] buff, int off,
              int length)
focal_class.class_method_signature: AbstractBlobStore.readBlock(byte[] digest, long pos)
focal_class.full_signature:  byte[] readBlock(byte[] digest, long pos)
focal_class.identifier: readBlock
focal_class.parameters: (byte[] digest, long pos)
focal_class.return: byte[]
focal_class.signature: byte[] readBlock(byte[] digest, long pos)
focal_class.class_method_signature: AbstractBlobStore.load(BlockId id)
focal_class.full_signature: @Override public Data load(BlockId id)
focal_class.identifier: load
focal_class.modifiers: @Override public
focal_class.parameters: (BlockId id)
focal_class.return: Data
focal_class.signature: Data load(BlockId id)
focal_class.class_method_signature: AbstractBlobStore.readBlockFromBackend(BlockId id)
focal_class.full_signature: protected abstract byte[] readBlockFromBackend(BlockId id)
focal_class.identifier: readBlockFromBackend
focal_class.modifiers: protected abstract
focal_class.parameters: (BlockId id)
focal_class.return: byte[]
focal_class.signature: byte[] readBlockFromBackend(BlockId id)
focal_class.class_method_signature: AbstractBlobStore.getBlobLength(String blobId)
focal_class.full_signature: @Override public long getBlobLength(String blobId)
focal_class.identifier: getBlobLength
focal_class.modifiers: @Override public
focal_class.parameters: (String blobId)
focal_class.return: long
focal_class.signature: long getBlobLength(String blobId)
focal_class.class_method_signature: AbstractBlobStore.mark(String blobId)
focal_class.full_signature: protected void mark(String blobId)
focal_class.identifier: mark
focal_class.modifiers: protected
focal_class.parameters: (String blobId)
focal_class.return: void
focal_class.signature: void mark(String blobId)
focal_class.class_method_signature: AbstractBlobStore.mark(ByteArrayInputStream idStream)
focal_class.full_signature: private void mark(ByteArrayInputStream idStream)
focal_class.identifier: mark
focal_class.modifiers: private
focal_class.parameters: (ByteArrayInputStream idStream)
focal_class.return: void
focal_class.signature: void mark(ByteArrayInputStream idStream)
focal_class.class_method_signature: AbstractBlobStore.resolveChunks(String blobId)
focal_class.full_signature: @Override public Iterator<String> resolveChunks(String blobId)
focal_class.identifier: resolveChunks
focal_class.modifiers: @Override public
focal_class.parameters: (String blobId)
focal_class.return: Iterator<String>
focal_class.signature: Iterator<String> resolveChunks(String blobId)
focal_class.class_method_signature: AbstractBlobStore.deleteChunks(List<String> chunkIds, long maxLastModifiedTime)
focal_class.full_signature: @Override public boolean deleteChunks(List<String> chunkIds, long maxLastModifiedTime)
focal_class.identifier: deleteChunks
focal_class.modifiers: @Override public
focal_class.parameters: (List<String> chunkIds, long maxLastModifiedTime)
focal_class.return: boolean
focal_class.signature: boolean deleteChunks(List<String> chunkIds, long maxLastModifiedTime)
focal_class.class_method_signature: AbstractBlobStore.close()
focal_class.full_signature: @Override public void close()
focal_class.identifier: close
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void close()
focal_method.body: @Override
      public String writeBlob(String tempFilePath) throws IOException {
          File file = new File(tempFilePath);
          InputStream in = null;
          try {
              in = new FileInputStream(file);
              return writeBlob(in);
          } finally {
              org.apache.commons.io.IOUtils.closeQuietly(in);
              FileUtils.forceDelete(file);
          }
      }
focal_method.class_method_signature: AbstractBlobStore.writeBlob(String tempFilePath)
focal_method.full_signature: @Override public String writeBlob(String tempFilePath)
focal_method.identifier: writeBlob
focal_method.invocations: writeBlob closeQuietly forceDelete
focal_method.modifiers: @Override public
focal_method.parameters: (String tempFilePath)
focal_method.return: String
focal_method.signature: String writeBlob(String tempFilePath)