|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jacorb.orb.BufferManager
public final class BufferManager
A BufferManager is used to share a pool of buffers and to implement a buffer allocation policy. This reduces the number of memory allocations and deallocations and the overall memory footprint. Buffers are generally created on demand. The BufferManager uses a singleton pattern, so will only be a single shared BuffferManager across all ORBs in a process.
| Method Summary | |
|---|---|
static void |
configure(org.apache.avalon.framework.configuration.Configuration configuration)
configures the BufferManager, in turn configures the singleton. |
byte[] |
getBuffer(int initial)
|
byte[] |
getBuffer(int initial,
boolean cdrStr)
getBuffer returns a new buffer. |
static BufferManager |
getInstance()
May only be called after configure() |
byte[] |
getPreferredMemoryBuffer()
|
void |
release()
|
void |
returnBuffer(byte[] current)
|
void |
returnBuffer(byte[] current,
boolean cdrStr)
Describe returnBuffer method here. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void configure(org.apache.avalon.framework.configuration.Configuration configuration)
public static BufferManager getInstance()
throws org.omg.CORBA.BAD_INV_ORDER
org.omg.CORBA.BAD_INV_ORDER - if not previously configuredpublic byte[] getPreferredMemoryBuffer()
public byte[] getBuffer(int initial)
public byte[] getBuffer(int initial,
boolean cdrStr)
getBuffer returns a new buffer.
initial - an int valuecdrStr - a boolean value to denote if CDROuputStream is caller
(may use cache in this situation)
byte[] valuepublic void returnBuffer(byte[] current)
public void returnBuffer(byte[] current,
boolean cdrStr)
returnBuffer method here.
current - a byte[] valuecdrStr - a boolean value value to denote if CDROuputStream is
caller (may use cache in this situation)public void release()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||