Skip to content

shzlw/horiz

Repository files navigation

Horiz

Build Status codecov

Horiz is a Java library that uses S3 as datastore and provides simplified Key-Value APIs.

Build

./gradlew build

Internal dependencies

implementation 'com.github.ben-manes.caffeine:caffeine:2.9.0'
implementation 'com.amazonaws:aws-java-sdk-s3:1.11.957'

API examples

KV store

// Create a new S3KVStore
S3KVStore s3KVStore = S3KVStoreBuilder.builder()
    .s3(S3Config.builder()
        .s3Client(AmazonS3ClientBuilder.defaultClient())
        .bucketName("mybucket")
        .build())
    .localCache(LocalCacheConfig.builder()
        .expire(5, TimeUnit.MINUTES)
        .maximumSize(100)
        .build())
    .build();

// Put, Get, Delete
s3KVStore.put("key", "val");
String val = s3KVStore.get("key");
s3KVStore.delete("key");

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages