Package com.hazelcast.transaction

Examples of com.hazelcast.transaction.TransactionContext


    public TxnMultiMapSizeRequest(String name) {
        super(name);
    }

    public Object innerCall() throws Exception {
        final TransactionContext context = getEndpoint().getTransactionContext(txnId);
        return context.getMultiMap(name).size();
    }
View Full Code Here


    }

    @Override
    public Object innerCall() throws Exception {
        final ClientEndpoint endpoint = getEndpoint();
        final TransactionContext context = endpoint.getTransactionContext(txnId);
        final TransactionalQueue queue = context.getQueue(name);
        return queue.size();
    }
View Full Code Here

    }

    @Override
    public Object innerCall() throws Exception {
        final ClientEndpoint endpoint = getEndpoint();
        final TransactionContext context = endpoint.getTransactionContext(txnId);
        final TransactionalQueue queue = context.getQueue(name);
        return queue.peek(timeout, TimeUnit.MILLISECONDS);
    }
View Full Code Here

        this(name, key);
        this.value = value;
    }

    public Object innerCall() throws Exception {
        final TransactionContext context = getEndpoint().getTransactionContext(txnId);
        final TransactionalMultiMap<Object, Object> multiMap = context.getMultiMap(name);
        return multiMap.remove(key, value);
    }
View Full Code Here

        this.key = key;
        this.value = value;
    }

    public Object innerCall() throws Exception {
        final TransactionContext context = getEndpoint().getTransactionContext(txnId);
        return context.getMultiMap(name).put(key, value);
    }
View Full Code Here

        super(name);
        this.key = key;
    }

    public Object innerCall() throws Exception {
        final TransactionContext context = getEndpoint().getTransactionContext(txnId);
        return context.getMultiMap(name).valueCount(key);
    }
View Full Code Here

        super(name);
        this.key = key;
    }

    public Object innerCall() throws Exception {
        final TransactionContext context = getEndpoint().getTransactionContext(txnId);
        final TransactionalMultiMap<Object, Object> multiMap = context.getMultiMap(name);
        final Collection<Object> objects = multiMap.remove(key);
        Collection<Data> coll = createCollection(objects.size());
        for (Object object : objects) {
            final Data data = toData(object);
            coll.add(data);
View Full Code Here

        this.key = key;
    }


    public Object innerCall() throws Exception {
        final TransactionContext context = getEndpoint().getTransactionContext(txnId);
        final Collection<Object> objects = context.getMultiMap(name).get(key);
        Collection<Data> coll = createCollection(objects.size());
        for (Object object : objects) {
            final Data data = toData(object);
            coll.add(data);
        }
View Full Code Here

        }
        return type;
    }

    public TransactionContext getTransactionContext(String txnId) {
        final TransactionContext transactionContext = transactionContextMap.get(txnId);
        if (transactionContext == null) {
            throw new TransactionException("No transaction context found for txnId:" + txnId);
        }
        return transactionContext;
    }
View Full Code Here

        this.ttl = timeUnit == null ? ttl : timeUnit.toMillis(ttl);
    }


    public Object innerCall() throws Exception {
        final TransactionContext context = getEndpoint().getTransactionContext(txnId);
        final TransactionalMap map = context.getMap(name);
        return innerCallInternal(map);
    }
View Full Code Here

TOP

Related Classes of com.hazelcast.transaction.TransactionContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.