org.apache.solr.cloud

## Class SizeLimitedDistributedMap

- java.lang.Object
- - org.apache.solr.cloud.DistributedMap
  - - org.apache.solr.cloud.SizeLimitedDistributedMap

-     public class SizeLimitedDistributedMap
      extends DistributedMap

  A size limited distributed map maintained in zk. Oldest znodes (as per modification time) are evicted as newer ones come in. When the map hits the specified maximum size, the oldest `maxSize / 10` items are evicted on the next `put(String, byte[])` invocation.

- - ### Field Summary

    - ### Fields inherited from class org.apache.solr.cloud.DistributedMap

      `dir, prefix, zookeeper`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SizeLimitedDistributedMap(SolrZkClient zookeeper, String dir, int maxSize)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `put(String trackingId, byte[] data)`

    - ### Methods inherited from class org.apache.solr.cloud.DistributedMap

      `clear, contains, get, remove, size`

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

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

- - ### Constructor Detail

    - #### SizeLimitedDistributedMap

          public SizeLimitedDistributedMap(SolrZkClient zookeeper,
                                           String dir,
                                           int maxSize)

  - ### Method Detail

    - #### put

          public void put(String trackingId,
                          byte[] data)
                   throws org.apache.zookeeper.KeeperException,
                          InterruptedException

      Overrides:
        `put` in class `DistributedMap`
      Throws:
        `org.apache.zookeeper.KeeperException`
        `InterruptedException`

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