use of com.hazelcast.core.TransactionalMap in project hazelcast by hazelcast.
the class TransactionalMapGetMessageTask 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.get(parameters.key);
return serializationService.toData(response);
}
use of com.hazelcast.core.TransactionalMap in project hazelcast by hazelcast.
the class TransactionalMapIsEmptyMessageTask method innerCall.
@Override
protected Object innerCall() throws Exception {
final TransactionContext context = getEndpoint().getTransactionContext(parameters.txnId);
final TransactionalMap map = context.getMap(parameters.name);
return map.isEmpty();
}
use of com.hazelcast.core.TransactionalMap in project hazelcast by hazelcast.
the class TransactionalMapPutMessageTask 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.put(parameters.key, parameters.value, parameters.ttl, TimeUnit.MILLISECONDS);
return serializationService.toData(response);
}
use of com.hazelcast.core.TransactionalMap in project hazelcast by hazelcast.
the class TransactionalMapRemoveMessageTask method innerCall.
@Override
protected Object innerCall() throws Exception {
final TransactionContext context = getEndpoint().getTransactionContext(parameters.txnId);
final TransactionalMap map = context.getMap(parameters.name);
Object oldValue = map.remove(parameters.key);
return serializationService.toData(oldValue);
}
use of com.hazelcast.core.TransactionalMap in project hazelcast by hazelcast.
the class TransactionalMapReplaceMessageTask method innerCall.
@Override
protected Object innerCall() throws Exception {
final TransactionContext context = getEndpoint().getTransactionContext(parameters.txnId);
final TransactionalMap map = context.getMap(parameters.name);
Object oldValue = map.replace(parameters.key, parameters.value);
return serializationService.toData(oldValue);
}
Aggregations