asto

A simple Java storage

License

License

MIT
GroupId

GroupId

com.yegor256
ArtifactId

ArtifactId

asto
Last Version

Last Version

0.2.0
Release Date

Release Date

Type

Type

jar
Description

Description

asto
A simple Java storage
Project URL

Project URL

https://github.com/yegor256/asto
Project Organization

Project Organization

jcabi.com
Source Code Management

Source Code Management

https://github.com/yegor256/asto

Download asto

How to add to project

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

Dependencies

compile (2)

Group / Artifact Type Version
com.jcabi : jcabi-log jar 0.18.1
io.reactivex.rxjava3 : rxjava jar 3.0.0-RC6

test (1)

Group / Artifact Type Version
commons-io : commons-io jar 2.5

Project Modules

There are no modules declared in this project.

EO principles respected here DevOps By Rultor.com We recommend IntelliJ IDEA

Build Status Javadoc License codecov Hits-of-Code Maven Central PDD status

Asto stands for Abstract Storage, an abstraction over physical data storage system. The main entity of the library is an interface com.artipie.asto.Storage, a contract which requires to implement the following functionalities:

  • put/get operations
  • transaction support
  • list files in a directory
  • check if a file/directory exists

Supported abstractions:

This is the dependency you need:

<dependency>
  <groupId>com.artipie</groupId>
  <artifactId>asto</artifactId>
  <version>[...]</version>
</dependency>

Read the Javadoc for more technical details.

Quick start

Create a hello.txt file with "Hello World!" content on file-system-based storage in blocking way:

final BlockingStorage storage = new BlockingStorage(
    new FileStorage(
        Files.createTempDirectory("temp-blocking")
    )
).save(new Key.From("hello.txt"), "Hello World!".getBytes());

The same with RxJava2 way:

new RxStorageWrapper(
    new FileStorage(
        Files.createTempDirectory("temp-rx")
    )
).save(
    new Key.From("hello.txt"),
    ByteBuffer.wrap("Hello World!".getBytes())
);

How to contribute

Fork repository, make changes, send us a pull request. We will review your changes and apply them to the master branch shortly, provided they don't violate our quality standards. To avoid frustration, before sending us your pull request please run full Maven build:

$ mvn clean install -Pqulice

To avoid build errors use Maven 3.2+.

Versions

Version
0.2.0
0.1.0
0.0.1