Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/haducloc/appslandia-scaling
Appslandia Scaling
https://github.com/haducloc/appslandia-scaling
java rocksdb
Last synced: about 2 months ago
JSON representation
Appslandia Scaling
- Host: GitHub
- URL: https://github.com/haducloc/appslandia-scaling
- Owner: haducloc
- License: mit
- Created: 2020-06-20T19:28:08.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-04-05T17:36:24.000Z (over 3 years ago)
- Last Synced: 2024-05-10T22:05:23.042Z (8 months ago)
- Topics: java, rocksdb
- Language: Java
- Homepage:
- Size: 29.3 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Appslandia Scaling
## Features
- **Facebook RocksDB** Utilizing
## Installation### Maven
```XMLcom.appslandia
appslandia-scaling
{LATEST_VERSION}com.appslandia
appslandia-common
{LATEST_VERSION}```
### Gradle
```
dependencies {
compile 'com.appslandia:appslandia-scaling:{LATEST_VERSION}'
compile 'com.appslandia:appslandia-common:{LATEST_VERSION}'
}
```## Sample Usage
### RocksDB
``` java
List descriptors = new ArrayList<>();// DEFAULT_COLUMN_FAMILY is required at index 0
descriptors.add(RocksUtils.newCfDescriptor(RocksManager.DEFAULT_COLUMN_FAMILY, new ColumnFamilyOptions()));
descriptors.add(RocksUtils.newCfDescriptor("other_column_family", new ColumnFamilyOptions()));DBOptions dbOptions = RocksUtils.newDBOptions().setCreateIfMissing(true).setCreateMissingColumnFamilies(true);
boolean readOnlyMode = false;
RocksCloseable rocksCloseable = RocksUtils.newRocksCloseable().add(descriptors).add(dbOptions);try (RocksManager db = RocksManager.open("database_dir", dbOptions, readOnlyMode, descriptors, rocksCloseable)) {
// db.put, db.get, db.delete, db.newRocksIterator, db.newRocksEntryIterator, etc.
} catch (RocksDBException ex) {
ex.printStackTrace();
}
```## Questions?
Please feel free to contact me if you have any questions or comments.
Email: [email protected]## License
This code is distributed under the terms and conditions of the [MIT license](LICENSE).