2015/07/26 - Apache DirectMemory has been retired.

For more information, please explore the Attic.

public abstract class

AbstractMemoryManager

extends Object
java.lang.Object
   ↳ org.apache.directmemory.memory.AbstractMemoryManager<V>
Known Direct Subclasses

Summary

Constants
long NEVER_EXPIRES
Fields
protected final Set<Pointer<V>> pointers
protected boolean returnNullWhenFull
protected final AtomicLong used
Public Constructors
AbstractMemoryManager()
Public Methods
<T extends V> Pointer<V> allocate(Class<T> type, int size, long expiresIn, long expires)
long collectExpired()
void collectLFU()
abstract Pointer<V> free(Pointer<V> pointer)
Set<Pointer<V>> getPointers()
abstract Pointer<V> store(byte[] payload, long expiresIn)
Pointer<V> store(byte[] payload)
Pointer<V> update(Pointer<V> pointer, byte[] payload)
long used()
Protected Methods
long free(Iterable<Pointer<V>> pointers)
boolean returnsNullWhenFull()
[Expand]
Inherited Methods
From class java.lang.Object

Constants

protected static final long NEVER_EXPIRES

Constant Value: 0 (0x0000000000000000)

Fields

protected final Set<Pointer<V>> pointers

protected boolean returnNullWhenFull

protected final AtomicLong used

Public Constructors

public AbstractMemoryManager ()

Public Methods

public Pointer<V> allocate (Class<T> type, int size, long expiresIn, long expires)

public long collectExpired ()

public void collectLFU ()

public abstract Pointer<V> free (Pointer<V> pointer)

public Set<Pointer<V>> getPointers ()

public abstract Pointer<V> store (byte[] payload, long expiresIn)

public Pointer<V> store (byte[] payload)

public Pointer<V> update (Pointer<V> pointer, byte[] payload)

public long used ()

Protected Methods

protected long free (Iterable<Pointer<V>> pointers)

protected boolean returnsNullWhenFull ()