Skip to content

Instantly share code, notes, and snippets.

@tobias
Created November 12, 2015 22:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tobias/c9575eec411174ae7829 to your computer and use it in GitHub Desktop.
Save tobias/c9575eec411174ae7829 to your computer and use it in GitHub Desktop.
public static CacheContainer<?> cacheContainerWithDefaults(final String name) {
return new CacheContainer<>(name)
// from https://github.com/wildfly/wildfly/tree//clustering/infinispan/extension/src/main/java/org/jboss/as/clustering/infinispan/subsystem/ThreadPoolResourceDefinition.java#L71
.asyncOperationsThreadPool(p -> p.minThreads(25)
.maxThreads(25)
.queueLength(1000)
.keepaliveTime(60000L))
.listenerThreadPool(p -> p.minThreads(1)
.maxThreads(1)
.queueLength(100000)
.keepaliveTime(60000L))
.persistenceThreadPool(p -> p.minThreads(1)
.maxThreads(4)
.queueLength(0)
.keepaliveTime(60000L))
.remoteCommandThreadPool(p -> p.minThreads(1)
.maxThreads(200)
.queueLength(0)
.keepaliveTime(60000L))
.stateTransferThreadPool(p -> p.minThreads(1)
.maxThreads(60)
.queueLength(0)
.keepaliveTime(60000L))
.transportThreadPool(p -> p.minThreads(25)
.maxThreads(25)
.queueLength(100000)
.keepaliveTime(60000L))
// from https://github.com/wildfly/wildfly/tree//clustering/infinispan/extension/src/main/java/org/jboss/as/clustering/infinispan/subsystem/ScheduledThreadPoolResourceDefinition.java#L72
.expirationThreadPool(p -> p.maxThreads(1)
.keepaliveTime(60000L))
.noneTransport();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment