This repository provides reactive extensions for the Aerospike Java Client.
Aerospike Reactor Client - a Reactor interface extension for the Aerospike Java Client.
The documentation for this project can be found on javadoc.io.
This project can be added through Maven Central.
Create a Reactor client
// Create a ClientPolicy.
ClientPolicy policy = new ClientPolicy();
// Set event loops to use in asynchronous commands.
policy.eventLoops = new NioEventLoops(1);
// Instantiate an AerospikeReactorClient which embeds an AerospikeClient.
AerospikeClient client = new AerospikeClient(policy, "localhost", 3000);
AerospikeReactorClient reactorClient = new AerospikeReactorClient(client);
Write record bin(s) using the Reactor client
Key key = new Key("test", null, "k1");
reactorClient.put(key, new Bin("bin1", 100)).block();
Get the record using the Reactor client
reactorClient.get(key).block();
Delete the record using the Reactor client
reactorClient.delete(key).block();
Check the tests for more usage examples.
- Java 8 or greater.
- Maven 3.0 or greater.
mvn clean package