Package com.hazelcast.config
Class LocalDeviceConfig
- java.lang.Object
-
- com.hazelcast.config.LocalDeviceConfig
-
- All Implemented Interfaces:
DeviceConfig
,NamedConfig
public final class LocalDeviceConfig extends java.lang.Object implements DeviceConfig
Local Device configuration for the Tiered-Store.- Since:
- 5.1
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_BLOCK_SIZE_IN_BYTES
Default block/sector size in bytes.static Capacity
DEFAULT_CAPACITY
Default device capacity.static java.lang.String
DEFAULT_DEVICE_BASE_DIR
Default base directory for the device.static java.lang.String
DEFAULT_DEVICE_NAME
Default device name.static int
DEFAULT_READ_IO_THREAD_COUNT
Default read IO thread count.static int
DEFAULT_WRITE_IO_THREAD_COUNT
Default write IO thread count.
-
Constructor Summary
Constructors Constructor Description LocalDeviceConfig()
LocalDeviceConfig(LocalDeviceConfig localDeviceConfig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
java.io.File
getBaseDir()
Base directory for this device.int
getBlockSize()
Returns disk block/sector size in bytes.Capacity
getCapacity()
Returns the capacity of this device.java.lang.String
getName()
Returns the device name.int
getReadIOThreadCount()
Returns the read IO thread count;int
getWriteIOThreadCount()
Returns the write IO thread countint
hashCode()
boolean
isLocal()
Returnstrue
sincethis
is a configuration for a local device.LocalDeviceConfig
setBaseDir(java.io.File baseDir)
Sets the base directory for this device.LocalDeviceConfig
setBlockSize(int blockSize)
Sets the disk block/sector size in bytes.LocalDeviceConfig
setCapacity(Capacity capacity)
Sets the capacity of this device.LocalDeviceConfig
setName(java.lang.String name)
Sets the device name.LocalDeviceConfig
setReadIOThreadCount(int readIOThreadCount)
Sets the read IO thread count.LocalDeviceConfig
setWriteIOThreadCount(int writeIOThreadCount)
Sets the write IO thread count.java.lang.String
toString()
-
-
-
Field Detail
-
DEFAULT_DEVICE_NAME
public static final java.lang.String DEFAULT_DEVICE_NAME
Default device name.- See Also:
- Constant Field Values
-
DEFAULT_DEVICE_BASE_DIR
public static final java.lang.String DEFAULT_DEVICE_BASE_DIR
Default base directory for the device.- See Also:
- Constant Field Values
-
DEFAULT_BLOCK_SIZE_IN_BYTES
public static final int DEFAULT_BLOCK_SIZE_IN_BYTES
Default block/sector size in bytes.- See Also:
- Constant Field Values
-
DEFAULT_READ_IO_THREAD_COUNT
public static final int DEFAULT_READ_IO_THREAD_COUNT
Default read IO thread count.- See Also:
- Constant Field Values
-
DEFAULT_WRITE_IO_THREAD_COUNT
public static final int DEFAULT_WRITE_IO_THREAD_COUNT
Default write IO thread count.- See Also:
- Constant Field Values
-
DEFAULT_CAPACITY
public static final Capacity DEFAULT_CAPACITY
Default device capacity. It is 256 GB.
-
-
Constructor Detail
-
LocalDeviceConfig
public LocalDeviceConfig()
-
LocalDeviceConfig
public LocalDeviceConfig(LocalDeviceConfig localDeviceConfig)
-
-
Method Detail
-
getName
public java.lang.String getName()
Returns the device name.- Specified by:
getName
in interfaceNamedConfig
-
setName
public LocalDeviceConfig setName(@Nonnull java.lang.String name)
Sets the device name.- Specified by:
setName
in interfaceNamedConfig
- Parameters:
name
- device name- Returns:
- this DeviceConfig
-
getBaseDir
public java.io.File getBaseDir()
Base directory for this device. Can be an absolute or relative path to the node startup directory.
-
setBaseDir
public LocalDeviceConfig setBaseDir(@Nonnull java.io.File baseDir)
Sets the base directory for this device.- Parameters:
baseDir
- base directory.- Returns:
- this DeviceConfig
-
getCapacity
public Capacity getCapacity()
Returns the capacity of this device.- Specified by:
getCapacity
in interfaceDeviceConfig
- Returns:
- device capacity.
-
setCapacity
public LocalDeviceConfig setCapacity(Capacity capacity)
Sets the capacity of this device.- Parameters:
capacity
- capacity.- Returns:
- this LocalDeviceConfig
-
getBlockSize
public int getBlockSize()
Returns disk block/sector size in bytes.- Returns:
- block size
-
setBlockSize
public LocalDeviceConfig setBlockSize(int blockSize)
Sets the disk block/sector size in bytes.- Parameters:
blockSize
- block size.- Returns:
- this DeviceConfig
-
getReadIOThreadCount
public int getReadIOThreadCount()
Returns the read IO thread count;- Returns:
- read IO thread count
-
setReadIOThreadCount
public LocalDeviceConfig setReadIOThreadCount(int readIOThreadCount)
Sets the read IO thread count.- Parameters:
readIOThreadCount
- read IO thread count- Returns:
- this DeviceConfig
-
getWriteIOThreadCount
public int getWriteIOThreadCount()
Returns the write IO thread count- Returns:
- write IO thread count
-
setWriteIOThreadCount
public LocalDeviceConfig setWriteIOThreadCount(int writeIOThreadCount)
Sets the write IO thread count.- Parameters:
writeIOThreadCount
- write IO thread count- Returns:
- this DeviceConfig
-
isLocal
public boolean isLocal()
Returnstrue
sincethis
is a configuration for a local device.- Specified by:
isLocal
in interfaceDeviceConfig
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-