package org.qi4j.cache.ehcache;

import org.qi4j.api.common.Optional;
import org.qi4j.api.configuration.ConfigurationComposite;
import org.qi4j.api.property.Property;

import java.util.List;

public interface EhCacheConfiguration
    extends ConfigurationComposite
{

    @Optional
    Property<Boolean> clearOnFlush();

    @Optional
    Property<Integer> diskAccessStripes();

    @Optional
    Property<Long> diskExpiryThreadIntervalSeconds();

    @Optional
    Property<Boolean> diskPersistent();

    @Optional
    Property<Integer> diskSpoolBufferSizeMB();

    @Optional
    Property<String> diskStorePath();

    @Optional
    Property<Boolean> eternal();

    @Optional
    Property<Boolean> loggingEnabled();

    /**
     * Number of objects the ehCache should keep in memory.
     * Defaults to 1000
     *
     * @return The maximum number of elements to be kept in memory.
     */
    @Optional
    Property<Integer> maxElementsInMemory();

    @Optional
    Property<Integer> maxElementsOnDisk();

    @Optional
    Property<String> memoryStoreEvictionPolicy();

    @Optional
    Property<String> name();

    @Optional
    Property<Boolean> overflowToDisk();

    @Optional
    Property<String> transactionalMode();

    @Optional
    Property<Long> timeToLiveSeconds();

    @Optional
    Property<Long> timeToIdleSeconds();

    @Optional
    Property<String> cacheManagerName();

    @Optional
    Property<String> monitoring();

    @Optional
    Property<Boolean> updateCheck();

    @Optional
    Property<List<String>> terracottaConfigURLs();
}

@@ -63,16 +63,56 @@
 tional;%0A
+import org.qi4j.api.common.UseDefaults;%0A
 import o
@@ -161,16 +161,16 @@
 posite;%0A
-
 import o
@@ -306,32 +306,45 @@
 %7B%0A%0A    @Optional
+ @UseDefaults
 %0A    Property%3CBo
@@ -372,32 +372,45 @@
 ;%0A%0A    @Optional
+ @UseDefaults
 %0A    Property%3CIn
@@ -443,32 +443,45 @@
 ;%0A%0A    @Optional
+ @UseDefaults
 %0A    Property%3CLo
@@ -525,32 +525,45 @@
 ;%0A%0A    @Optional
+ @UseDefaults
 %0A    Property%3CBo
@@ -593,32 +593,45 @@
 ;%0A%0A    @Optional
+ @UseDefaults
 %0A    Property%3CIn
@@ -668,32 +668,45 @@
 ;%0A%0A    @Optional
+ @UseDefaults
 %0A    Property%3CSt
@@ -734,32 +734,45 @@
 ;%0A%0A    @Optional
+ @UseDefaults
 %0A    Property%3CBo
@@ -795,32 +795,45 @@
 ;%0A%0A    @Optional
+ @UseDefaults
 %0A    Property%3CBo
@@ -1038,32 +1038,45 @@
 */%0A    @Optional
+ @UseDefaults
 %0A    Property%3CIn
@@ -1111,32 +1111,45 @@
 ;%0A%0A    @Optional
+ @UseDefaults
 %0A    Property%3CIn
@@ -1182,32 +1182,45 @@
 ;%0A%0A    @Optional
+ @UseDefaults
 %0A    Property%3CSt
@@ -1260,32 +1260,45 @@
 ;%0A%0A    @Optional
+ @UseDefaults
 %0A    Property%3CSt
@@ -1317,32 +1317,45 @@
 ;%0A%0A    @Optional
+ @UseDefaults
 %0A    Property%3CBo
@@ -1385,32 +1385,45 @@
 ;%0A%0A    @Optional
+ @UseDefaults
 %0A    Property%3CSt
@@ -1455,32 +1455,45 @@
 ;%0A%0A    @Optional
+ @UseDefaults
 %0A    Property%3CLo
@@ -1523,32 +1523,45 @@
 ;%0A%0A    @Optional
+ @UseDefaults
 %0A    Property%3CLo
@@ -1591,32 +1591,45 @@
 ;%0A%0A    @Optional
+ @UseDefaults
 %0A    Property%3CSt
@@ -1660,32 +1660,45 @@
 ;%0A%0A    @Optional
+ @UseDefaults
 %0A    Property%3CSt
@@ -1723,32 +1723,45 @@
 ;%0A%0A    @Optional
+ @UseDefaults
 %0A    Property%3CBo
@@ -1779,24 +1779,24 @@
 teCheck();%0A%0A
-
     @Optiona
@@ -1796,16 +1796,29 @@
 Optional
+ @UseDefaults
 %0A    Pro

Make Ehcache Configuration use defaults