use of com.aerospike.client.policy.WritePolicy in project XRTB by benmfaul.
the class RedissonClient method hmset.
/**
* Do a mhset with expire (No op on cache2k, expiry already set globally
* @param id String. The key name.
* @param m Map. The value to set.
* @param expire int. The number of seconds before expiry.
* @throws Exception on Cache2k or aerospike errors.
*/
public void hmset(String id, Map m, int expire) throws Exception {
if (ae == null) {
cache.put(id, m);
return;
}
WritePolicy policy = new WritePolicy();
policy.expiration = expire;
Key key = new Key("test", "cache", id);
Bin bin1 = new Bin("value", m);
ae.getClient().put(policy, key, bin1);
}
Aggregations