Search in sources :

Example 1 with TransactionalMapProxy

use of com.hazelcast.map.impl.tx.TransactionalMapProxy in project hazelcast by hazelcast.

the class TransactionalMapContainsKeyMessageTask method innerCall.

@Override
protected Object innerCall() throws Exception {
    final TransactionContext context = endpoint.getTransactionContext(parameters.txnId);
    final TransactionalMap map = context.getMap(parameters.name);
    return ((TransactionalMapProxy) map).containsKey(parameters.key, true);
}
Also used : TransactionalMap(com.hazelcast.transaction.TransactionalMap) TransactionalMapProxy(com.hazelcast.map.impl.tx.TransactionalMapProxy) TransactionContext(com.hazelcast.transaction.TransactionContext)

Example 2 with TransactionalMapProxy

use of com.hazelcast.map.impl.tx.TransactionalMapProxy in project hazelcast by hazelcast.

the class TransactionalMapGetMessageTask method innerCall.

@Override
protected Object innerCall() throws Exception {
    final TransactionContext context = endpoint.getTransactionContext(parameters.txnId);
    final TransactionalMap map = context.getMap(parameters.name);
    Object response = ((TransactionalMapProxy) map).get(parameters.key, true);
    return serializationService.toData(response);
}
Also used : TransactionalMap(com.hazelcast.transaction.TransactionalMap) TransactionalMapProxy(com.hazelcast.map.impl.tx.TransactionalMapProxy) TransactionContext(com.hazelcast.transaction.TransactionContext)

Aggregations

TransactionalMapProxy (com.hazelcast.map.impl.tx.TransactionalMapProxy)2 TransactionContext (com.hazelcast.transaction.TransactionContext)2 TransactionalMap (com.hazelcast.transaction.TransactionalMap)2