use of org.apache.geode.cache.DiskWriteAttributesFactory in project geode by apache.
the class DiskWriteAttributesJUnitTest method testGetDefaultNonRollingAsync.
/**
* Test method for 'org.apache.geode.cache.DiskWriteAttributes.getDefaultNonRollingAsync()'
*/
@Test
public void testGetDefaultNonRollingAsync() {
DiskWriteAttributesFactory dwaf = new DiskWriteAttributesFactory();
dwaf.setRollOplogs(false);
DiskWriteAttributes dwa = dwaf.create();
assertTrue(!dwa.isSynchronous());
assertTrue(!dwa.isRollOplogs());
}
use of org.apache.geode.cache.DiskWriteAttributesFactory in project geode by apache.
the class DiskWriteAttributesJUnitTest method testGetDefaultRollingSync.
/**
* Test method for 'org.apache.geode.cache.DiskWriteAttributes.getDefaultRollingSync()'
*/
@Test
public void testGetDefaultRollingSync() {
DiskWriteAttributesFactory dwaf = new DiskWriteAttributesFactory();
dwaf.setSynchronous(true);
DiskWriteAttributes dwa = dwaf.create();
assertTrue(dwa.isSynchronous());
assertTrue(dwa.isRollOplogs());
}
use of org.apache.geode.cache.DiskWriteAttributesFactory in project geode by apache.
the class DiskWriteAttributesJUnitTest method testGetDefaultRollingAsync.
/**
* Test method for 'org.apache.geode.cache.DiskWriteAttributes.getDefaultRollingAsync()'
*/
@Test
public void testGetDefaultRollingAsync() {
DiskWriteAttributesFactory dwaf = new DiskWriteAttributesFactory();
DiskWriteAttributes dwa = dwaf.create();
assertTrue(!dwa.isSynchronous());
assertTrue(dwa.isRollOplogs());
}
use of org.apache.geode.cache.DiskWriteAttributesFactory in project geode by apache.
the class DiskWriteAttributesJUnitTest method testGetDefaultSync.
/**
* Test method for 'org.apache.geode.cache.DiskWriteAttributes.getDefaultSync()'
*/
@Test
public void testGetDefaultSync() {
DiskWriteAttributesFactory dwaf = new DiskWriteAttributesFactory();
dwaf.setSynchronous(true);
DiskWriteAttributes dwa = dwaf.create();
assertTrue(dwa.isSynchronous());
assertTrue(dwa.isRollOplogs());
}
use of org.apache.geode.cache.DiskWriteAttributesFactory in project geode by apache.
the class CacheXml66DUnitTest method testMaxOplogSize.
@Test
public void testMaxOplogSize() throws Exception {
CacheCreation cache = new CacheCreation();
// Set properties for Asynch writes
RegionAttributesCreation attrs = new RegionAttributesCreation(cache);
RegionCreation root = (RegionCreation) cache.createRegion("root", attrs);
{
attrs = new RegionAttributesCreation(cache);
DiskWriteAttributesFactory dwaf = new DiskWriteAttributesFactory();
dwaf.setSynchronous(true);
dwaf.setMaxOplogSize(1);
attrs.setDiskWriteAttributes(dwaf.create());
root.createSubregion("sync", attrs);
}
{
attrs = new RegionAttributesCreation(cache);
DiskWriteAttributesFactory dwaf = new DiskWriteAttributesFactory();
dwaf.setTimeInterval(123L);
dwaf.setBytesThreshold(456L);
dwaf.setMaxOplogSize(1);
attrs.setDiskWriteAttributes(dwaf.create());
root.createSubregion("async", attrs);
}
testXml(cache);
}
Aggregations