Skip to content

Commit

Permalink
adds configuration to the resource pools builder
Browse files Browse the repository at this point in the history
  • Loading branch information
nwoodward committed May 15, 2024
1 parent 94a9cd0 commit d0e2f83
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
import org.ehcache.config.builders.CacheConfigurationBuilder;
import org.ehcache.config.builders.CacheManagerBuilder;
import org.ehcache.config.builders.ResourcePoolsBuilder;
import org.ehcache.config.units.MemoryUnit;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -68,7 +69,7 @@ public static void main(String[] args) {
@Override
protected LoopingTaskProducer buildTaskProducer() {

List<PropertyDefinition> defintions =
List<PropertyDefinition> definitions =
new PropertyDefinitionListBuilder().addAws()
.addSwift()
.addNotificationConfig()
Expand All @@ -82,7 +83,7 @@ protected LoopingTaskProducer buildTaskProducer() {
.addLocalDuplicationDir()
.addWorkDir()
.build();
PropertyVerifier verifier = new PropertyVerifier(defintions);
PropertyVerifier verifier = new PropertyVerifier(definitions);
verifier.verify(System.getProperties());

LoopingTaskProducerConfigurationManager config = new LoopingTaskProducerConfigurationManager();
Expand Down Expand Up @@ -148,7 +149,7 @@ protected LoopingTaskProducer buildTaskProducer() {
.withCache("contentIdCache",
CacheConfigurationBuilder.newCacheConfigurationBuilder(
String.class, String.class,
ResourcePoolsBuilder.newResourcePoolsBuilder()))
ResourcePoolsBuilder.newResourcePoolsBuilder().disk(100, MemoryUnit.MB, true)))
.build(true);
Cache<String, String> cache = cacheManager.getCache("contentIdCache", String.class, String.class);

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,7 @@
<dependency>
<groupId>org.ehcache</groupId>
<artifactId>ehcache</artifactId>
<version>3.10.0</version>
<version>3.10.8</version>
</dependency>

</dependencies>
Expand Down

0 comments on commit d0e2f83

Please sign in to comment.