libcommonc++
0.7
|
Thread-local Java direct buffer. More...
#include <JavaThreadLocalBuffer.h++>
Public Member Functions | |
JavaThreadLocalBuffer (JavaVirtualMachine *jvm, size_t size) | |
Construct a new ThreadLocalJavaBuffer with the given size. More... | |
~JavaThreadLocalBuffer () | |
Destructor. More... | |
JavaBuffer & | operator* () |
Pointer-dereference operator. More... | |
JavaBuffer * | operator-> () |
Pointer operator. More... | |
void | setValue (JavaBuffer *value) |
Set the value of the thread-local object for the calling thread. More... | |
JavaBuffer * | getValue () |
Get the value of the thread-local object for the calling thread. More... | |
Static Public Member Functions | |
static int | getSlotCount () |
Get the maximum number of thread-local storage slots available on this platform. More... | |
Protected Member Functions | |
JavaBuffer * | initialValue () |
Provide the intial value of the thread-local object for the calling thread. More... | |
Thread-local Java direct buffer.
The buffer exists as a separate instance for each calling thread.
JavaThreadLocalBuffer | ( | JavaVirtualMachine * | jvm, |
size_t | size | ||
) |
Construct a new ThreadLocalJavaBuffer with the given size.
jvm | The Java Virtual Machine in which to create the buffer. |
size | The size of the buffer, in bytes. |
Destructor.
|
staticinherited |
Get the maximum number of thread-local storage slots available on this platform.
A return value of -1 indicates that there is no limit.
|
inherited |
Get the value of the thread-local object for the calling thread.
|
protectedvirtual |
Provide the intial value of the thread-local object for the calling thread.
The default implementation returns NULL.
Reimplemented from ThreadLocal< JavaBuffer >.
|
inherited |
Pointer-dereference operator.
NullPointerException | If the value of the object was never initialized for the calling thread. |
|
inherited |
Pointer operator.
NullPointerException | If the value of the object was never initialized for the calling thread. |
|
inherited |
Set the value of the thread-local object for the calling thread.
value | The new value. |