Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mxro/async-properties
Async Properties is a Java library to store and retrieve properties in an asynchronous manner.
https://github.com/mxro/async-properties
Last synced: about 2 months ago
JSON representation
Async Properties is a Java library to store and retrieve properties in an asynchronous manner.
- Host: GitHub
- URL: https://github.com/mxro/async-properties
- Owner: mxro
- Created: 2015-01-13T20:16:27.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2023-06-17T05:19:08.000Z (over 1 year ago)
- Last Synced: 2023-06-17T06:20:57.171Z (over 1 year ago)
- Language: Java
- Size: 117 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
** MOVED **: This project has moved to [javadelight/delight-async-properties](https://github.com/javadelight/delight-async-properties) and is now part of the [Java Delight Suite](http://javadelight.org).
[![Build Status](https://travis-ci.org/mxro/async-properties.svg?branch=master)](https://travis-ci.org/mxro/async-properties)
# Async Properties
[Async Properties](https://github.com/mxro/async-properties) is a Java library to store and retrieve properties in an asynchronous manner.
## Usage
### Storing Properties
Properties are set using the `record(operation)` method. All operations are performed asynchronously.
```java
PropertyNode props = Properties.create(Properties.defaultFactory());props.record(Properties.set("key", "value"));
props.stop().get();
```
### Retrieving Properties
Properties can be retrieved using the `retrieve(key)` method. `retrieve(key)` returns a [Promise](http://modules.appjangle.com/java-promise/latest/apidocs/de/mxro/promise/Promise.html)
which must be resolved using `.get()`.```java
PropertyNode props = Properties.create(Properties.defaultFactory());props.record(Properties.set("key", "value"));
System.out.println(props.retrieve("key").get());
props.stop().get();
```
### Rendering All Properties
Renders all properties in a human-readable JSON representation.
```java
PropertyNode props = Properties.create(Properties.defaultFactory());props.record(Properties.set("key", "value"));
System.out.println(props.render().get());
props.stop().get();
```
### Maven Dependency
```xml
de.mxro.async.properties
async-properties
[latest version]```
Find latest version [here](http://modules.appjangle.com/async-properties/latest/project-summary.html).
Add repository if required:
```xml
Appjangle Releases
http://maven.appjangle.com/appjangle/releases
```
## Compatibility
This project is compatible with the following environments:
- Java 1.6+
- GWT 2.5.0+
- Android (any)
- OSGi (any)## Further Resources
- [JavaDocs](http://modules.appjangle.com/async-properties/latest/apidocs/)
- [Project Reports](http://modules.appjangle.com/async-properties/latest/project-reports.html)
- [README with TOC](http://documentup.com/mxro/async-properties)[![Documentation Status](https://readthedocs.org/projects/async-properties/badge/?version=latest)](https://readthedocs.org/projects/async-properties/?badge=latest)