Package com.hazelcast.transaction.impl

Examples of com.hazelcast.transaction.impl.SerializableXID


        ObjectDataInput in = reader.getRawDataInput();
        options = new TransactionOptions();
        options.readData(in);
        boolean sXidNotNull = in.readBoolean();
        if (sXidNotNull) {
            sXid = new SerializableXID();
            sXid.readData(in);
        }

    }
View Full Code Here


            throw new TransactionException(e);
        }
    }

    public void addManagedTransaction(Xid xid, TransactionProxy transaction) {
        final SerializableXID sXid = new SerializableXID(xid.getFormatId(),
                xid.getGlobalTransactionId(), xid.getBranchQualifier());
        transaction.setXid(sXid);
        managedTransactions.put(sXid, transaction);
    }
View Full Code Here

        transaction.setXid(sXid);
        managedTransactions.put(sXid, transaction);
    }

    public TransactionProxy getManagedTransaction(Xid xid) {
        final SerializableXID sXid = new SerializableXID(xid.getFormatId(),
                xid.getGlobalTransactionId(), xid.getBranchQualifier());
        return managedTransactions.get(sXid);
    }
View Full Code Here

                xid.getGlobalTransactionId(), xid.getBranchQualifier());
        return managedTransactions.get(sXid);
    }

    public void removeManagedTransaction(Xid xid) {
        final SerializableXID sXid = new SerializableXID(xid.getFormatId(),
                xid.getGlobalTransactionId(), xid.getBranchQualifier());
        managedTransactions.remove(sXid);
    }
View Full Code Here

            final RecoverAllTransactionsRequest request = new RecoverAllTransactionsRequest();
            final ICompletableFuture<SerializableCollection> future = invocationService.send(request, connection);
            final SerializableCollection collectionWrapper = serializationService.toObject(future.get());

            for (Data data : collectionWrapper) {
                final SerializableXID xid = serializationService.toObject(data);
                recoveredTransactions.put(xid, connection);
            }

            final Set<SerializableXID> xidSet = recoveredTransactions.keySet();
            return xidSet.toArray(new Xid[xidSet.size()]);
View Full Code Here

        }
        return empty;
    }

    public boolean recover(Xid xid, boolean commit) {
        final SerializableXID sXid = new SerializableXID(xid.getFormatId(),
                xid.getGlobalTransactionId(), xid.getBranchQualifier());
        final ClientConnection connection = recoveredTransactions.remove(sXid);
        if (connection == null) {
            return false;
        }
View Full Code Here

    @Override
    public synchronized void end(Xid xid, int flags) throws XAException {
        nullCheck(xid);
        final TransactionProxy transaction = getTransaction();
        final SerializableXID sXid = transaction.getXid();
        if (sXid == null || !sXid.equals(xid)) {
            logger.severe("started xid: " + sXid + " and given xid : " + xid + " not equal!!!");
        }
        validateTx(transaction, ACTIVE);

        switch (flags) {
View Full Code Here

    @Override
    public synchronized int prepare(Xid xid) throws XAException {
        nullCheck(xid);
        final TransactionProxy transaction = getTransaction();
        final SerializableXID sXid = transaction.getXid();
        if (sXid == null || !sXid.equals(xid)) {
            logger.severe("started xid: " + sXid + " and given xid : " + xid + " not equal!!!");
        }
        validateTx(transaction, ACTIVE);

        try {
View Full Code Here

    @Override
    public void read(PortableReader reader) throws IOException {
        commit = reader.readBoolean("c");
        ObjectDataInput in = reader.getRawDataInput();
        sXid = new SerializableXID();
        sXid.readData(in);
    }
View Full Code Here

    @Override
    public synchronized void end(Xid xid, int flags) throws XAException {
        nullCheck(xid);
        final TransactionProxy transaction = getTransaction();
        final SerializableXID sXid = transaction.getXid();
        if (sXid == null || !sXid.equals(xid)) {
            logger.severe("started xid: " + sXid + " and given xid : " + xid + " not equal!!!");
        }
        validateTx(transaction, ACTIVE);

        switch (flags) {
View Full Code Here

TOP

Related Classes of com.hazelcast.transaction.impl.SerializableXID

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.