T - The generic type of the thread-local object.public abstract class JoinTask.ThreadLocalFactory<T extends IBuffer<E>,E> extends Object
JoinTask or an AbstractBTree. The pool can be torn down
when the container is torn down, which prevents its thread-local
references from escaping.| Modifier | Constructor and Description |
|---|---|
protected |
JoinTask.ThreadLocalFactory() |
protected |
JoinTask.ThreadLocalFactory(int initialCapacity,
float loadFactor,
int concurrencyLevel) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(E e)
Add the element to the thread-local buffer.
|
void |
flush()
Flush each of the unsynchronized buffers onto their backing
synchronized buffer.
|
protected abstract T |
initialValue()
Create and return a new object.
|
void |
reset()
Reset each of the synchronized buffers, discarding their buffered
writes.
|
int |
size()
Return the #of thread-local objects.
|
protected JoinTask.ThreadLocalFactory()
protected JoinTask.ThreadLocalFactory(int initialCapacity,
float loadFactor,
int concurrencyLevel)
public final int size()
public void add(E e)
e - An element.IllegalStateException - if the factory is asynchronously closed.public void flush()
RuntimeException - if the join is halted.public void reset()
Note: This method is used during error processing, therefore it DOES
NOT check JoinTask.halt.
protected abstract T initialValue()
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.