org.apache.lucene.misc

## Class CollectorMemoryTracker

- java.lang.Object
- - org.apache.lucene.misc.CollectorMemoryTracker

- All Implemented Interfaces:
    MemoryTracker

      public class CollectorMemoryTracker
      extends Object
      implements MemoryTracker

  Default implementation of `MemoryTracker` that tracks allocations and allows setting a memory limit per collector

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CollectorMemoryTracker(String name, long memoryLimit)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `getBytes()`
    `void` | `updateBytes(long bytes)`

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

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

- - ### Constructor Detail

    - #### CollectorMemoryTracker

          public CollectorMemoryTracker(String name,
                                        long memoryLimit)

  - ### Method Detail

    - #### updateBytes

          public void updateBytes(long bytes)

      Specified by:
        `updateBytes` in interface `MemoryTracker`

    - #### getBytes

          public long getBytes()

      Specified by:
        `getBytes` in interface `MemoryTracker`

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