Package org.xerial.snappy.pool
Class DefaultPoolFactory
- java.lang.Object
-
- org.xerial.snappy.pool.DefaultPoolFactory
-
public final class DefaultPoolFactory extends java.lang.Object
Manages implementation ofBufferPool
to use by default. Setting the system propertyDISABLE_CACHING_PROPERTY
totrue
will cause theQuiescentBufferPool
to be used by default. Otherwise,CachingBufferPool
will be used by default.setDefaultPool(BufferPool)
can be used to explicitly control the implementation to use.
-
-
Field Summary
Fields Modifier and Type Field Description private static BufferPool
defaultPool
static java.lang.String
DISABLE_CACHING_PROPERTY
Name of system property to disable use ofCachingBufferPool
by default.
-
Constructor Summary
Constructors Constructor Description DefaultPoolFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static BufferPool
getDefaultPool()
static void
setDefaultPool(BufferPool pool)
Sets the default instance to use.
-
-
-
Field Detail
-
DISABLE_CACHING_PROPERTY
public static final java.lang.String DISABLE_CACHING_PROPERTY
Name of system property to disable use ofCachingBufferPool
by default.- See Also:
- Constant Field Values
-
defaultPool
private static volatile BufferPool defaultPool
-
-
Method Detail
-
getDefaultPool
public static BufferPool getDefaultPool()
- Returns:
- The default instance to use.
-
setDefaultPool
public static void setDefaultPool(BufferPool pool)
Sets the default instance to use.- Parameters:
pool
- The default instance to use. Must not benull
.- See Also:
getDefaultPool()
-
-