Search in sources :

Example 1 with ExistsSequenceListener

use of com.aerospike.client.listener.ExistsSequenceListener in project aerospike-client-java by aerospike.

the class TestAsyncBatch method asyncBatchExistsSequence.

@Test
public void asyncBatchExistsSequence() throws Exception {
    client.exists(eventLoop, new ExistsSequenceListener() {

        public void onExists(Key key, boolean exists) {
            assertEquals(true, exists);
        }

        public void onSuccess() {
            notifyComplete();
        }

        public void onFailure(AerospikeException e) {
            setError(e);
            notifyComplete();
        }
    }, null, sendKeys);
    waitTillComplete();
}
Also used : AerospikeException(com.aerospike.client.AerospikeException) Key(com.aerospike.client.Key) ExistsSequenceListener(com.aerospike.client.listener.ExistsSequenceListener) Test(org.junit.Test)

Aggregations

AerospikeException (com.aerospike.client.AerospikeException)1 Key (com.aerospike.client.Key)1 ExistsSequenceListener (com.aerospike.client.listener.ExistsSequenceListener)1 Test (org.junit.Test)1