use of com.hazelcast.core.TransactionalMap in project hazelcast by hazelcast.
the class TransactionalMapDeleteMessageTask method innerCall.
@Override
protected Object innerCall() throws Exception {
final TransactionContext context = getEndpoint().getTransactionContext(parameters.txnId);
final TransactionalMap map = context.getMap(parameters.name);
map.delete(parameters.key);
return null;
}
use of com.hazelcast.core.TransactionalMap in project hazelcast by hazelcast.
the class TransactionalMapKeySetMessageTask method innerCall.
@Override
protected Object innerCall() throws Exception {
final TransactionContext context = getEndpoint().getTransactionContext(parameters.txnId);
final TransactionalMap map = context.getMap(parameters.name);
Set keySet = map.keySet();
List<Data> list = new ArrayList<Data>(keySet.size());
for (Object o : keySet) {
list.add(serializationService.toData(o));
}
return list;
}
use of com.hazelcast.core.TransactionalMap in project hazelcast by hazelcast.
the class TransactionalMapKeySetWithPredicateMessageTask method innerCall.
@Override
protected Object innerCall() throws Exception {
final TransactionContext context = getEndpoint().getTransactionContext(parameters.txnId);
final TransactionalMap map = context.getMap(parameters.name);
Predicate predicate = serializationService.toObject(parameters.predicate);
Set keySet = map.keySet(predicate);
List<Data> list = new ArrayList<Data>(keySet.size());
for (Object o : keySet) {
list.add(serializationService.toData(o));
}
return list;
}
use of com.hazelcast.core.TransactionalMap in project hazelcast by hazelcast.
the class TransactionalMapPutIfAbsentMessageTask method innerCall.
@Override
protected Object innerCall() throws Exception {
final TransactionContext context = getEndpoint().getTransactionContext(parameters.txnId);
final TransactionalMap map = context.getMap(parameters.name);
Object response = map.putIfAbsent(parameters.key, parameters.value);
return serializationService.toData(response);
}
use of com.hazelcast.core.TransactionalMap in project hazelcast by hazelcast.
the class TransactionalMapRemoveIfSameMessageTask method innerCall.
@Override
protected Object innerCall() throws Exception {
final TransactionContext context = getEndpoint().getTransactionContext(parameters.txnId);
final TransactionalMap map = context.getMap(parameters.name);
return map.remove(parameters.key, parameters.value);
}
Aggregations