APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.xml.internal.stream.util

public Class ThreadLocalBufferAllocator

extends Object
Class Inheritance
Imports
java.lang.ref.*

This is a Singleton class that allows you to allocate buffer that are stored in ThreadLocal. This class stores 3 types of char buffers - small (< 128 bytes), medium (<2K) and large (> 2K) as well as three byte buffers - small, medium and large. The local storage is activated on the return of the buffer. The buffer returns null if it is already allocated.
Authors
Binu John, Santiago PericasGeertsen

Field Summary

Modifier and TypeField and Description
private static final ThreadLocal<SoftReference<BufferAllocator>>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static BufferAllocator
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

TLback to summary
private static final ThreadLocal<SoftReference<BufferAllocator>> TL

Constructor Detail

ThreadLocalBufferAllocatorback to summary
public ThreadLocalBufferAllocator()

Method Detail

getBufferAllocatorback to summary
public static BufferAllocator getBufferAllocator()