org.apache.solr.core

## Class BlobRepository

- java.lang.Object
- - org.apache.solr.core.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.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `BlobRepository.BlobContent<T>`
    `static class` | `BlobRepository.BlobContentRef<T>`
    `static interface` | `BlobRepository.Decoder<T>`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BlobRepository(CoreContainer coreContainer)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `decrementBlobRefCount(BlobRepository.BlobContentRef ref)` This is to decrement a ref count
    `BlobRepository.BlobContentRef<ByteBuffer>` | `getBlobIncRef(String key)` Returns the contents of a blob containing a ByteBuffer and increments a reference count.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 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

Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.