public class OffHeapDiskStoreConfiguration extends java.lang.Object implements ServiceConfiguration<org.ehcache.impl.internal.store.disk.OffHeapDiskStore.Provider,OffHeapDiskStoreConfiguration>
ServiceConfiguration
for the default off heap disk store
.Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_DISK_SEGMENTS |
static int |
DEFAULT_WRITER_CONCURRENCY |
Constructor and Description |
---|
OffHeapDiskStoreConfiguration(int diskSegments)
Creates a new configuration instance using the provided
diskSegments . |
OffHeapDiskStoreConfiguration(java.lang.String threadPoolAlias,
int writerConcurrency)
Creates a new configuration instance using the provided parameters.
|
OffHeapDiskStoreConfiguration(java.lang.String threadPoolAlias,
int writerConcurrency,
int diskSegments)
Creates a new configuration instance using the provided parameters.
|
Modifier and Type | Method and Description |
---|---|
OffHeapDiskStoreConfiguration |
build(OffHeapDiskStoreConfiguration config)
Construct a new configuration from the given detached representation.
|
OffHeapDiskStoreConfiguration |
derive()
Derive a detached representation from this configuration
|
int |
getDiskSegments()
Returns the number of disk segments created
|
java.lang.Class<org.ehcache.impl.internal.store.disk.OffHeapDiskStore.Provider> |
getServiceType()
Indicates which service this configuration works with.
|
java.lang.String |
getThreadPoolAlias()
Returns the configured thread pool alias.
|
int |
getWriterConcurrency()
Returns the configured writer concurrency
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
compatibleWith
public static final int DEFAULT_WRITER_CONCURRENCY
public static final int DEFAULT_DISK_SEGMENTS
public OffHeapDiskStoreConfiguration(int diskSegments)
diskSegments
. Other attributes are set to their default
(null
for threadPoolAlias
and DEFAULT_WRITER_CONCURRENCY
for writerConcurrency
).diskSegments
- number of disk segments allocated. The more disk segments there is, the more concurrency you get but
the more resources you are using (mainly file pointers)public OffHeapDiskStoreConfiguration(java.lang.String threadPoolAlias, int writerConcurrency)
diskSegments
is set to DEFAULT_DISK_SEGMENTS
.threadPoolAlias
- the thread pool aliaswriterConcurrency
- the writer concurrencyPooledExecutionServiceConfiguration
public OffHeapDiskStoreConfiguration(java.lang.String threadPoolAlias, int writerConcurrency, int diskSegments)
threadPoolAlias
- the thread pool aliaswriterConcurrency
- the writer concurrencydiskSegments
- number of disk segments allocated. The more disk segments there is, the more concurrency you get but
the more resources you are using (mainly file pointers)PooledExecutionServiceConfiguration
public java.lang.String getThreadPoolAlias()
PooledExecutionServiceConfiguration
public int getWriterConcurrency()
public int getDiskSegments()
public java.lang.Class<org.ehcache.impl.internal.store.disk.OffHeapDiskStore.Provider> getServiceType()
getServiceType
in interface ServiceConfiguration<org.ehcache.impl.internal.store.disk.OffHeapDiskStore.Provider,OffHeapDiskStoreConfiguration>
public OffHeapDiskStoreConfiguration derive()
ServiceConfiguration
derive
in interface ServiceConfiguration<org.ehcache.impl.internal.store.disk.OffHeapDiskStore.Provider,OffHeapDiskStoreConfiguration>
public OffHeapDiskStoreConfiguration build(OffHeapDiskStoreConfiguration config)
ServiceConfiguration
build
in interface ServiceConfiguration<org.ehcache.impl.internal.store.disk.OffHeapDiskStore.Provider,OffHeapDiskStoreConfiguration>
config
- a detached representation