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

For more information, please explore the Attic.

public class

UnsafeMemoryManagerServiceImpl

extends AbstractMemoryManager<V>
implements MemoryManagerService<V>
java.lang.Object
   ↳ org.apache.directmemory.memory.AbstractMemoryManager<V>
     ↳ org.apache.directmemory.memory.UnsafeMemoryManagerServiceImpl<V>

Summary

Constants
long NEVER_EXPIRES
[Expand]
Inherited Constants
From class org.apache.directmemory.memory.AbstractMemoryManager
Fields
protected static Logger logger
[Expand]
Inherited Fields
From class org.apache.directmemory.memory.AbstractMemoryManager
Public Constructors
UnsafeMemoryManagerServiceImpl()
Public Methods
long capacity()
void clear()
void close()
Pointer<V> free(Pointer<V> pointer)
void init(int numberOfBuffers, int size)
Initialize the internal structure.
byte[] retrieve(Pointer<V> pointer)
Pointer<V> store(byte[] payload, long expiresIn)
long used()
Protected Methods
Pointer<V> instanciatePointer(int size, long expiresIn, long expires)
[Expand]
Inherited Methods
From class org.apache.directmemory.memory.AbstractMemoryManager
From class java.lang.Object
From interface java.io.Closeable
From interface org.apache.directmemory.memory.MemoryManagerService

Constants

protected static final long NEVER_EXPIRES

Constant Value: 0 (0x0000000000000000)

Fields

protected static Logger logger

Public Constructors

public UnsafeMemoryManagerServiceImpl ()

Public Methods

public long capacity ()

public void clear ()

public void close ()

Throws
IOException

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

public void init (int numberOfBuffers, int size)

Initialize the internal structure. Need to be called before the service can be used.

Parameters
numberOfBuffers : number of internal bucket
size : size in B of internal buckets

public byte[] retrieve (Pointer<V> pointer)

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

public long used ()

Protected Methods

protected Pointer<V> instanciatePointer (int size, long expiresIn, long expires)