Skip to content

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

Description

@bbottema

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions