use of com.hazelcast.config.LocalDeviceConfig in project hazelcast by hazelcast.
the class TestFullApplicationContext method testDevice.
@Test
public void testDevice() {
String deviceName0 = "device0";
String deviceName1 = "device1";
File baseDir0 = new File("/dev/devices/tiered_store_device0");
File baseDir1 = new File("/dev/devices/tiered_store_device1");
int blockSize = 8192;
int readIOThreadCount = 16;
int writeIOThreadCount0 = 8;
int writeIOThreadCount1 = 16;
assertEquals(2, config.getDeviceConfigs().size());
LocalDeviceConfig localDeviceConfig = config.getDeviceConfig(deviceName0);
assertEquals(deviceName0, localDeviceConfig.getName());
assertEquals(baseDir0, localDeviceConfig.getBaseDir());
assertEquals(blockSize, localDeviceConfig.getBlockSize());
assertEquals(readIOThreadCount, localDeviceConfig.getReadIOThreadCount());
assertEquals(writeIOThreadCount0, localDeviceConfig.getWriteIOThreadCount());
assertEquals(new MemorySize(9321, MemoryUnit.MEGABYTES), localDeviceConfig.getCapacity());
localDeviceConfig = config.getDeviceConfig(deviceName1);
assertEquals(deviceName1, localDeviceConfig.getName());
assertEquals(baseDir1, localDeviceConfig.getBaseDir());
assertEquals(blockSize, localDeviceConfig.getBlockSize());
assertEquals(readIOThreadCount, localDeviceConfig.getReadIOThreadCount());
assertEquals(writeIOThreadCount1, localDeviceConfig.getWriteIOThreadCount());
assertEquals(LocalDeviceConfig.DEFAULT_CAPACITY, localDeviceConfig.getCapacity());
}
use of com.hazelcast.config.LocalDeviceConfig in project hazelcast by hazelcast.
the class MemberDomConfigProcessor method handleLocalDevice.
protected void handleLocalDevice(Node parentNode) {
String name = getAttribute(parentNode, "name");
LocalDeviceConfig localDeviceConfig = (LocalDeviceConfig) ConfigUtils.getByNameOrNew(config.getDeviceConfigs(), name, LocalDeviceConfig.class);
handleLocalDeviceNode(parentNode, localDeviceConfig);
}
use of com.hazelcast.config.LocalDeviceConfig in project hazelcast by hazelcast.
the class YamlMemberDomConfigProcessor method handleLocalDevice.
@Override
protected void handleLocalDevice(Node parentNode) {
for (Node deviceNode : childElements(parentNode)) {
String name = deviceNode.getNodeName();
LocalDeviceConfig localDeviceConfig = (LocalDeviceConfig) ConfigUtils.getByNameOrNew(config.getDeviceConfigs(), name, LocalDeviceConfig.class);
handleLocalDeviceNode(deviceNode, localDeviceConfig);
}
}
Aggregations