RollingBuffer (Lucene 3.6.2 API)
Keywords: org.apache.lucene.util.RollingBuffer class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.lucene.util
Class RollingBuffer<T extends RollingBuffer.Resettable>

    java.lang.Object
      org.apache.lucene.util.RollingBuffer<T>

    public abstract class RollingBuffer<T extends RollingBuffer.Resettable>

extends Object

Acts like forever growing T[], but internally uses a circular buffer to reuse instances of T.

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Nested Class Summary
`static interface` | `RollingBuffer.Resettable`

Constructor Summary
`RollingBuffer()`

Method Summary
`void` | `freeBefore(int pos)`
`T` | `get(int pos)` Get T instance for this absolute position; this is allowed to be arbitrarily far "in the future" but cannot be before the last freeBefore.
`protected abstract T` | `newInstance()`
`void` | `reset()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### RollingBuffer

    public RollingBuffer()

Method Detail

### newInstance

    protected abstract T newInstance()

### reset

    public void reset()

### get

    public T get(int pos)

  Get T instance for this absolute position; this is allowed to be arbitrarily far "in the future" but cannot be before the last freeBefore.

### freeBefore

    public void freeBefore(int pos)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD