FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Use clustered-object-pool cluster-specific configuration · Issue #8 · simple-java-mail/smtp-connection-pool · GitHub

Use clustered-object-pool cluster-specific configuration #8

Description

Pull in clustered-object-pool support for cluster-specific defaults so clustered SMTP pools can preserve different behavior per cluster key instead of relying only on one global config.

Usage:

SmtpClusterConfig<UUID> defaults = new SmtpClusterConfig<>();
SmtpConnectionPoolClustered<UUID> pool = new SmtpConnectionPoolClustered<>(defaults);

SmtpClusterConfig<UUID> constrainedCluster = new SmtpClusterConfig<>();
constrainedCluster.getConfigBuilder()
    .defaultCorePoolSize(0)
    .defaultMaxPoolSize(1)
    .claimTimeout(new Timeout(30, TimeUnit.SECONDS));

pool.registerResourceCluster(constrainedClusterKey, constrainedCluster.getConfigBuilder().build());
pool.registerResourcePool(new ResourceClusterAndPoolKey<>(constrainedClusterKey, sessionServerA));

Supports bbottema/simple-java-mail#565.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL