JavaThreadLocalBuffer Class Reference

Thread-local Java direct buffer. More...

#include <JavaThreadLocalBuffer.h++>

Inheritance diagram for JavaThreadLocalBuffer:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 JavaThreadLocalBuffer (JavaVirtualMachine *jvm, size_t size)
 Construct a new ThreadLocalJavaBuffer with the given size.
 ~JavaThreadLocalBuffer () throw ()
 Destructor.
JavaBufferoperator* () throw (NullPointerException)
 Pointer-dereference operator.
JavaBufferoperator-> () throw (NullPointerException)
 Pointer operator.
void setValue (JavaBuffer *value) throw ()
 Set the value of the thread-local object for the calling thread.
JavaBuffergetValue () throw ()
 Get the value of the thread-local object for the calling thread.

Static Public Member Functions

static int getSlotCount ()
 Get the maximum number of thread-local storage slots available on this platform.

Protected Member Functions

JavaBufferinitialValue ()
 Provide the intial value of the thread-local object for the calling thread.

Detailed Description

Thread-local Java direct buffer.

The buffer exists as a separate instance for each calling thread.

Author:
Mark Lindner

Constructor & Destructor Documentation

JavaThreadLocalBuffer ( JavaVirtualMachine jvm,
size_t  size 
)

Construct a new ThreadLocalJavaBuffer with the given size.

Parameters:
jvm The Java Virtual Machine in which to create the buffer.
size The size of the buffer, in bytes.
~JavaThreadLocalBuffer (  )  throw ()

Destructor.


Member Function Documentation

static int getSlotCount (  )  [static, inherited]

Get the maximum number of thread-local storage slots available on this platform.

A return value of -1 indicates that there is no limit.

JavaBuffer * getValue (  )  throw () [inherited]

Get the value of the thread-local object for the calling thread.

Returns:
The current (possibly NULL) value.
JavaBuffer * initialValue (  )  [protected, virtual]

Provide the intial value of the thread-local object for the calling thread.

The default implementation returns NULL.

Returns:
The initial value.

Reimplemented from ThreadLocal< JavaBuffer >.

JavaBuffer & operator* (  )  throw (NullPointerException) [inherited]

Pointer-dereference operator.

Returns:
A reference to the thread-local object.
Exceptions:
NullPointerException If the value of the object was never initialized for the calling thread.
JavaBuffer * operator-> (  )  throw (NullPointerException) [inherited]

Pointer operator.

Returns:
A pointer to the thread-local object.
Exceptions:
NullPointerException If the value of the object was never initialized for the calling thread.
void setValue ( JavaBuffer value  )  throw () [inherited]

Set the value of the thread-local object for the calling thread.

Parameters:
value The new value.

The documentation for this class was generated from the following files:
Generated on Sat Nov 26 16:49:09 2011 for libcommonc++ by  doxygen 1.6.3