use of com.hazelcast.transaction.TransactionalMap in project hazelcast by hazelcast.
the class TransactionalMapSetMessageTask method innerCall.
@Override
protected Object innerCall() throws Exception {
final TransactionContext context = endpoint.getTransactionContext(parameters.txnId);
final TransactionalMap map = context.getMap(parameters.name);
map.set(parameters.key, parameters.value);
return null;
}
use of com.hazelcast.transaction.TransactionalMap in project hazelcast by hazelcast.
the class TransactionalMapValuesMessageTask method innerCall.
@Override
protected Object innerCall() throws Exception {
final TransactionContext context = endpoint.getTransactionContext(parameters.txnId);
final TransactionalMap map = context.getMap(parameters.name);
Collection values = map.values();
List<Data> list = new ArrayList<Data>(values.size());
for (Object o : values) {
list.add(serializationService.toData(o));
}
return list;
}
use of com.hazelcast.transaction.TransactionalMap in project hazelcast by hazelcast.
the class TransactionalMapKeySetWithPredicateMessageTask method innerCall.
@Override
protected Object innerCall() throws Exception {
final TransactionContext context = endpoint.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.transaction.TransactionalMap in project hazelcast by hazelcast.
the class TransactionalMapSizeMessageTask method innerCall.
@Override
protected Object innerCall() throws Exception {
final TransactionContext context = endpoint.getTransactionContext(parameters.txnId);
final TransactionalMap map = context.getMap(parameters.name);
return map.size();
}
use of com.hazelcast.transaction.TransactionalMap in project hazelcast by hazelcast.
the class TransactionalMapValuesWithPredicateMessageTask method innerCall.
@Override
protected Object innerCall() throws Exception {
final TransactionContext context = endpoint.getTransactionContext(parameters.txnId);
final TransactionalMap map = context.getMap(parameters.name);
Predicate predicate = serializationService.toObject(parameters.predicate);
Collection values = map.values(predicate);
List<Data> list = new ArrayList<Data>(values.size());
for (Object o : values) {
list.add(serializationService.toData(o));
}
return list;
}
Aggregations