Class BlobRepository


  • public class BlobRepository
    extends Object
    The purpose of this class is to store the Jars loaded in memory and to keep only one copy of the Jar in a single node.
    • Field Detail

      • RANDOM

        public static final Random RANDOM
    • Constructor Detail

      • BlobRepository

        public BlobRepository​(CoreContainer coreContainer)
    • Method Detail

      • getBlobIncRef

        public BlobRepository.BlobContentRef<ByteBuffer> getBlobIncRef​(String key)
        Returns the contents of a blob containing a ByteBuffer and increments a reference count. Please return the same object to decrease the refcount. This is normally used for storing jar files, and binary raw data. If you are caching Java Objects you want to use SolrCore#loadDecodeAndCacheBlob(String, Decoder)
        Parameters:
        key - it is a combination of blobname and version like blobName/version
        Returns:
        The reference of a blob
      • decrementBlobRefCount

        public void decrementBlobRefCount​(BlobRepository.BlobContentRef<?> ref)
        This is to decrement a ref count
        Parameters:
        ref - The reference that is already there. Doing multiple calls with same ref will not matter