Fixed classpath (removed woodstox), added files for fastObjectPool

This commit is contained in:
nathan 2014-10-02 01:52:04 +02:00
parent 99c32e9863
commit 9b1ee07cf8
3 changed files with 27 additions and 0 deletions

View File

@ -24,5 +24,6 @@
<classpathentry kind="lib" path="/Dependencies/asm/asm-5.0.3.jar" sourcepath="/Dependencies/asm/asm-5.0.3-src.zip"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry combineaccessrules="false" kind="src" path="/JavaLauncher-Util"/>
<classpathentry kind="lib" path="/Dependencies/jodaTime/joda-time-2.4.jar" sourcepath="/Dependencies/jodaTime/joda-time-2.4-sources.zip"/>
<classpathentry kind="output" path="classes"/>
</classpath>

View File

@ -0,0 +1,21 @@
package dorkbox.util.objectPool;
import java.util.concurrent.atomic.AtomicInteger;
public class Holder<T> {
private T value;
static final int FREE = 0;
static final int USED = 1;
AtomicInteger state = new AtomicInteger(FREE);
public Holder(T value) {
this.value = value;
}
public T getValue() {
return this.value;
}
}

View File

@ -0,0 +1,5 @@
package dorkbox.util.objectPool;
public interface PoolFactory<T> {
public T create();
}