retreive-id-utils

Sonatype helps open source projects to set up Maven repositories on https://oss.sonatype.org/

License

License

The Artistic License 2.0
Categories

Categories

Ant Build Tools
GroupId

GroupId

com.github.phantomthief
ArtifactId

ArtifactId

retrieve-id-utils
Last Version

Last Version

1.0.10
Release Date

Release Date

Type

Type

jar
Description

Description

retreive-id-utils
Sonatype helps open source projects to set up Maven repositories on https://oss.sonatype.org/
Project URL

Project URL

https://github.com/PhantomThief/retrieve-id-utils
Source Code Management

Source Code Management

https://github.com/PhantomThief/retrieve-id-utils.git

Download retrieve-id-utils

How to add to project

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

Dependencies

compile (7)

Group / Artifact Type Version
com.github.phantomthief : more-lambdas jar 0.1.8
org.apache.commons : commons-collections4 jar 4.1
com.google.guava : guava jar 28.1-jre
org.springframework : spring-web Optional jar 4.2.4.RELEASE
org.apache.commons : commons-lang3 jar 3.4
org.slf4j : slf4j-api jar 1.7.21
com.google.code.findbugs : jsr305 Optional jar 3.0.2

test (2)

Group / Artifact Type Version
org.junit.jupiter : junit-jupiter-api jar
ch.qos.logback : logback-classic jar 1.1.8

Project Modules

There are no modules declared in this project.

retrieve-id-utils

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

批量获取数据,多级存储结构(或者缓存)筛选。

  • 每一级数据缓存都有可以配置回流
  • 强类型
  • 只支持jdk1.8

Usage

List<Integer> ids = Arrays.asList(1, 2, 3, 4, 5);
Map<Integer, String> result = RetrieveIdUtils.get(ids, Arrays.asList( s//
        new IMultiDataAccess<Integer, String>() {

            @Override
            public Map<Integer, String> get(Collection<Integer> keys) {
                return ...; // 第一级缓存读取
            }

            @Override
            public void set(Map<Integer, String> dataMap) {
            	// 第一级缓存回流
            }
        },
        new IMultiDataAccess<Integer, String>() {

            @Override
            public Map<Integer, String> get(Collection<Integer> keys) {
                return ...; // 第二级缓存读取
            }

        }));

Versions

Version
1.0.10
1.0.7
1.0.6
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0