Simple Pool

A simple Java Pool

Categories

Categories

Ant Build Tools
GroupId

GroupId

com.github.phantomthief
ArtifactId

ArtifactId

simple-pool
Last Version

Last Version

0.1.19
Release Date

Release Date

Type

Type

jar
Description

Description

Simple Pool
A simple Java Pool
Project URL

Project URL

https://github.com/PhantomThief/simple-pool
Source Code Management

Source Code Management

https://github.com/PhantomThief/simple-pool.git

Download simple-pool

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.phantomthief/simple-pool/ -->
<dependency>
    <groupId>com.github.phantomthief</groupId>
    <artifactId>simple-pool</artifactId>
    <version>0.1.19</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.phantomthief/simple-pool/
implementation 'com.github.phantomthief:simple-pool:0.1.19'
// https://jarcasting.com/artifacts/com.github.phantomthief/simple-pool/
implementation ("com.github.phantomthief:simple-pool:0.1.19")
'com.github.phantomthief:simple-pool:jar:0.1.19'
<dependency org="com.github.phantomthief" name="simple-pool" rev="0.1.19">
  <artifact name="simple-pool" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.phantomthief', module='simple-pool', version='0.1.19')
)
libraryDependencies += "com.github.phantomthief" % "simple-pool" % "0.1.19"
[com.github.phantomthief/simple-pool "0.1.19"]

Dependencies

compile (3)

Group / Artifact Type Version
org.slf4j : slf4j-api jar 1.7.21
com.google.guava : guava jar 28.1-jre
com.github.phantomthief : more-lambdas jar 0.1.49

provided (1)

Group / Artifact Type Version
com.google.code.findbugs : jsr305 jar 3.0.2

test (4)

Group / Artifact Type Version
org.junit.jupiter : junit-jupiter-api jar
ch.qos.logback : logback-classic jar 1.1.8
org.openjdk.jmh : jmh-core jar 1.23
org.openjdk.jmh : jmh-generator-annprocess jar 1.23

Project Modules

There are no modules declared in this project.

simple-pool

Build Status Coverage Status Total alerts Language grade: Java Maven Central

A simple pool library for Java

  • support concurrency use for objects.
  • jdk1.8 only

Get Started

Pool<MyObject> pool = ConcurrencyAwarePool.<MyObject> builder()
                .destroy(MyObject::close)
                .maxSize(30)
                .minIdle(1)
                .evaluatePeriod(ofSeconds(2))
                .simpleThresholdStrategy(10, 0.8)
                .build(MyObject::new);

MyResult myResult = pool.supply(myObject-> myObject.doSomething());

Versions

Version
0.1.19
0.1.18
0.1.17
0.1.16
0.1.15
0.1.14
0.1.13
0.1.12
0.1.11
0.1.10
0.1.9
0.1.8
0.1.7
0.1.6
0.1.5
0.1.4
0.1.3
0.1.2
0.1.1
0.1.0