aerospike / aerospike-client-java

Aerospike Java Client Library
Other
236 stars 212 forks source link

Provide a way to change default policy when using IAerospikeClient/IAsyncClient #48

Closed vkorenev closed 8 years ago

vkorenev commented 9 years ago

Scenario: I want to put a value using client's default write policy, but I want to set expiration time for the record. If I use the AerospikeClient class I can do that like this:

AerospikeClient client = getClient();
WritePolicy policy = new WritePolicy(client.writePolicyDefault);
policy.expiration = 10;
client.put(policy, key, bin);

But I cannot access writePolicyDefault if I use the IAerospikeClient interface. Please either create getters for default policies in the interfaces or provide another way to apply a modified default policy for an operation.

BrianNichols commented 9 years ago

We will add getters for the default policies in the interfaces in the next release.

BrianNichols commented 8 years ago

Java client has been released.