Class 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 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 interface NamedConfig
      • setName

        public LocalDeviceConfig setName​(@Nonnull
                                         java.lang.String name)
        Sets the device name.
        Specified by:
        setName in interface NamedConfig
        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 interface DeviceConfig
        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()
        Returns true since this is a configuration for a local device.
        Specified by:
        isLocal in interface DeviceConfig
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object