Search in sources :

Example 1 with DiskWriteAttributes

use of org.apache.geode.cache.DiskWriteAttributes 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());
}
Also used : DiskWriteAttributes(org.apache.geode.cache.DiskWriteAttributes) DiskWriteAttributesFactory(org.apache.geode.cache.DiskWriteAttributesFactory) UnitTest(org.apache.geode.test.junit.categories.UnitTest) Test(org.junit.Test)

Example 2 with DiskWriteAttributes

use of org.apache.geode.cache.DiskWriteAttributes 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());
}
Also used : DiskWriteAttributes(org.apache.geode.cache.DiskWriteAttributes) DiskWriteAttributesFactory(org.apache.geode.cache.DiskWriteAttributesFactory) UnitTest(org.apache.geode.test.junit.categories.UnitTest) Test(org.junit.Test)

Example 3 with DiskWriteAttributes

use of org.apache.geode.cache.DiskWriteAttributes 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());
}
Also used : DiskWriteAttributes(org.apache.geode.cache.DiskWriteAttributes) DiskWriteAttributesFactory(org.apache.geode.cache.DiskWriteAttributesFactory) UnitTest(org.apache.geode.test.junit.categories.UnitTest) Test(org.junit.Test)

Example 4 with DiskWriteAttributes

use of org.apache.geode.cache.DiskWriteAttributes 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());
}
Also used : DiskWriteAttributes(org.apache.geode.cache.DiskWriteAttributes) DiskWriteAttributesFactory(org.apache.geode.cache.DiskWriteAttributesFactory) UnitTest(org.apache.geode.test.junit.categories.UnitTest) Test(org.junit.Test)

Example 5 with DiskWriteAttributes

use of org.apache.geode.cache.DiskWriteAttributes in project geode by apache.

the class CacheXmlParser method endDiskWriteAttributes.

/**
   * When a <code>disk-write-attributes</code> element is finished, the {@link DiskWriteAttributes}
   * is on top of the stack followed by the {@link RegionAttributesCreation} to which the expiration
   * attributes are assigned.
   */
private void endDiskWriteAttributes() {
    DiskWriteAttributes dwa = (DiskWriteAttributes) stack.pop();
    RegionAttributesCreation attrs = peekRegionAttributesContext(DISK_WRITE_ATTRIBUTES);
    attrs.setDiskWriteAttributes(dwa);
}
Also used : DiskWriteAttributes(org.apache.geode.cache.DiskWriteAttributes)

Aggregations

DiskWriteAttributes (org.apache.geode.cache.DiskWriteAttributes)9 DiskWriteAttributesFactory (org.apache.geode.cache.DiskWriteAttributesFactory)8 UnitTest (org.apache.geode.test.junit.categories.UnitTest)8 Test (org.junit.Test)8