Package com.persistit

Examples of com.persistit.Exchange.store()


    @Override
    public void addOnlineHandledHKey(Session session, int tableID, Key hKey) {
        Exchange ex = onlineHandledHKeyExchange(session, tableID);
        try {
            ex.clear().getKey().appendByteArray(hKey.getEncodedBytes(), 0, hKey.getEncodedSize());
            ex.store();
        } catch(PersistitException | RollbackException e) {
            throw wrapPersistitException(session, e);
        } finally {
            treeService.releaseExchange(session, ex);
        }
View Full Code Here


        OnlineSession onlineSession = getOnlineSession(session, true);
        Exchange ex = schemaTreeExchange(session);
        try {
            ex.clear().append(S_K_ONLINE).append(onlineSession.id).append(S_K_ERROR);
            ex.getValue().putString(message);
            ex.store();
        } catch(PersistitException | RollbackException e) {
            if(ex != null) {
                treeService.releaseExchange(session, ex);
            }
            throw wrapPersistitException(session, e);
View Full Code Here

        onlineSession.tableIDs.add(changeSet.getTableId());
        Exchange ex = schemaTreeExchange(session);
        try {
            ex.clear().append(S_K_ONLINE).append(onlineSession.id).append(S_K_CHANGE).append(changeSet.getTableId());
            ex.getValue().putByteArray(ChangeSetHelper.save(changeSet));
            ex.store();
        } catch(PersistitException | RollbackException e) {
            if(ex != null) {
                treeService.releaseExchange(session, ex);
            }
            throw wrapPersistitException(session, e);
View Full Code Here

            ex.clear().append(S_K_DELAYED).append(id).append(timestamp);
            ex.getValue().setStreamMode(true);
            ex.getValue().put(schema);
            ex.getValue().put(treeName);
            ex.getValue().setStreamMode(false);
            ex.store();
        } catch(PersistitException | RollbackException e) {
            throw wrapPersistitException(session, e);
        } finally {
            treeService.releaseExchange(session, ex);
        }
View Full Code Here

            saveMetaAndDataVersions(ex);

            // online,cid => generation
            ex.clear().append(S_K_ONLINE).append(onlineSession.id);
            ex.getValue().put(newAIS.getGeneration());
            ex.store();

            // online,cid,protobuf,schema = bytes
            ByteBuffer buffer = null;
            ex.append(S_K_PROTOBUF).append("");
            for(String name : schemas) {
View Full Code Here

        Exchange ex = schemaTreeExchange(session);
        try {
            long id = ex.getTree().getSeqAccumulator(ACCUMULATOR_INDEX_ONLINE_ID).allocate();
            ex.clear().append(S_K_ONLINE).append(id);
            ex.getValue().put(-1L); // No generation yet
            ex.store();
            return id;
        } catch(PersistitException | RollbackException e) {
            throw wrapPersistitException(session, e);
        } finally {
            treeService.releaseExchange(session, ex);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.