Examples of commit()


Examples of org.apache.accumulo.tserver.Tablet.CommitSession.commit()

          long t1 = System.currentTimeMillis();
          for (Entry<CommitSession,? extends List<Mutation>> entry : sendables.entrySet()) {
            CommitSession commitSession = entry.getKey();
            List<Mutation> mutations = entry.getValue();

            commitSession.commit(mutations);

            Tablet tablet = commitSession.getTablet();

            if (tablet == us.currentTablet) {
              // because constraint violations may filter out some

Examples of org.apache.ace.repository.Repository.commit()

    }

    @Override
    protected boolean doCommit(ServiceReference ref, long version, InputStream data) throws IllegalArgumentException, IOException {
        Repository r = (Repository) m_context.getService(ref);
        boolean result = r.commit(data, version);
        m_context.ungetService(ref);
        return result;
    }

    @Override

Examples of org.apache.ace.repository.ext.CachedRepository.commit()

        CachedRepository m_cachedRepository = new CachedRepositoryImpl(m_repository, m_backupRepository, 0);
        byte[] testContent = new byte[] {'i', 'n', 'i', 't', 'i', 'a', 'l'};

        InputStream input = new ByteArrayInputStream(testContent);
        m_cachedRepository.commit(input, 0);

        m_cachedRepository = new CachedRepositoryImpl(m_repository, m_backupRepository, 0);
        input = m_cachedRepository.checkout(1);
        byte[] inputBytes = AdminTestUtil.copy(input);
        assert AdminTestUtil.byteArraysEqual(inputBytes, testContent) : "We got something different than 'initial' from checkout: " + new String(inputBytes);

Examples of org.apache.ace.repository.ext.impl.CachedRepositoryImpl.commit()

        CachedRepository m_cachedRepository = new CachedRepositoryImpl(m_repository, m_backupRepository, 0);
        byte[] testContent = new byte[] {'i', 'n', 'i', 't', 'i', 'a', 'l'};

        InputStream input = new ByteArrayInputStream(testContent);
        m_cachedRepository.commit(input, 0);

        m_cachedRepository = new CachedRepositoryImpl(m_repository, m_backupRepository, 0);
        input = m_cachedRepository.checkout(1);
        byte[] inputBytes = AdminTestUtil.copy(input);
        assert AdminTestUtil.byteArraysEqual(inputBytes, testContent) : "We got something different than 'initial' from checkout: " + new String(inputBytes);

Examples of org.apache.activemq.ActiveMQSession.commit()

            map.setString("accountNumber", accountNumber);
            map.setFloat("balance", balance);

            producer.send(map);
        }
        session.commit();
        conn.close();
    }

    @Destroy
    public void destroy() throws Exception {

Examples of org.apache.activemq.store.kahadb.disk.page.Transaction.commit()

    @Override
    protected Index<String, Long> createIndex() throws Exception {

        Transaction tx = pf.tx();
        long id = tx.allocate().getPageId();
        tx.commit();

        HashIndex<String, Long> index = new HashIndex<String, Long>(pf, id);
        index.setKeyMarshaller(StringMarshaller.INSTANCE);
        index.setValueMarshaller(LongMarshaller.INSTANCE);
       

Examples of org.apache.activemq.transaction.Transaction.commit()

        return transaction.prepare();
    }

    public void commitTransaction(ConnectionContext context, TransactionId xid, boolean onePhase) throws Exception {
        Transaction transaction = getTransaction(context, xid, true);
        transaction.commit(onePhase);
    }

    public void rollbackTransaction(ConnectionContext context, TransactionId xid) throws Exception {
        Transaction transaction = getTransaction(context, xid, true);
        transaction.rollback();

Examples of org.apache.activemq.transport.stomp.StompConnection.commit()

    connection.connect("system", "manager");
   
    connection.begin("tx1");
    connection.send("/queue/test", "message1");
    connection.send("/queue/test", "message2");
    connection.commit("tx1");
   
    connection.subscribe("/queue/test", Subscribe.AckModeValues.CLIENT);
   
    connection.begin("tx2");
   

Examples of org.apache.archiva.transaction.FileTransaction.commit()

        if ( !dryrun )
        {
            try
            {
                transaction.commit();
            }
            catch ( TransactionException e )
            {
                throw new ArtifactConversionException( Messages.getString( "transaction.failure", e.getMessage() ),
                                                       e ); //$NON-NLS-1$

Examples of org.apache.aurora.scheduler.storage.log.LogManager.StreamManager.StreamTransaction.commit()

  public void testStreamManagerSuccessiveCommits() throws CodingException {
    control.replay();

    StreamManager streamManager = createNoMessagesStreamManager();
    StreamTransaction streamTransaction = streamManager.startTransaction();
    streamTransaction.commit();

    assertNotSame("Expected a new transaction to be started after a commit",
        streamTransaction, streamManager.startTransaction());
  }
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.