Examples of commit()


Examples of org.apache.lucene.util.TwoPhaseCommitTool.TwoPhaseCommitWrapper.commit()

    // wrapper should ignore passed commitData
    wrapper.prepareCommit(new HashMap<String, String>());
    assertSame(commitData, impl.prepareCommitData);

    wrapper.commit();
    assertSame(commitData, impl.commitData);

    // wrapper should ignore passed commitData
    wrapper.commit(new HashMap<String, String>());
    assertSame(commitData, impl.commitData);

Examples of org.apache.marmotta.kiwi.persistence.KiWiConnection.commit()

            // needs to be equal, and should also be the identical object!
            Assert.assertEquals(literal,testLiteral1);
            Assert.assertEquals(uri,((KiWiLiteral)testLiteral1).getType());
            //Assert.assertTrue(literal == testLiteral1);

            connection.commit();

            KiWiNode testLiteral2 = connection.loadNodeById(literal.getId());

            // needs to be equal, and should also be the identical object!
            Assert.assertEquals(literal,testLiteral2);

Examples of org.apache.marmotta.kiwi.reasoner.persistence.KiWiReasoningConnection.commit()

        KiWiReasoningConnection connection = rpersistence.getConnection();
        try {
            // should not throw an exception and the program should have a database ID afterwards
            connection.storeProgram(p);
            connection.commit();

            Assert.assertNotNull("program did not get a database ID",p.getId());

            // load the program by name and check if it is equal to the original program
            Program p1 = connection.loadProgram("test-001");

Examples of org.apache.marmotta.kiwi.versioning.persistence.KiWiVersioningConnection.commit()

            KiWiTriple triple1 = new KiWiTriple(subject1,pred_1,object_1,context);
            KiWiTriple triple2 = new KiWiTriple(subject2,pred_2,object_2,context);

            connection.storeTriple(triple1);
            connection.storeTriple(triple2);
            connection.commit();

            Version version1 = new Version();
            version1.setCommitTime(new Date());
            version1.addTriple(triple1);
            connection.storeVersion(version1);

Examples of org.apache.marmotta.ldcache.api.LDCachingConnection.commit()

                    con.removeCacheEntry(entry.getResource());
                    con.addCacheEntry(entry.getResource(),entry);
                }

                con.commit();
            } catch(RepositoryException ex) {
                con.rollback();
            } finally {
                con.close();
            }

Examples of org.apache.marmotta.ldcache.backend.kiwi.persistence.LDCachingKiWiPersistenceConnection.commit()

            LDCachingKiWiPersistenceConnection con = persistence.getConnection();
            try {
                CacheEntry entry = con.getCacheEntry(resource);
                return  entry != null && entry.getTripleCount() > 0;
            } finally {
                con.commit();
                con.close();
            }
        } catch (SQLException e) {
            throw new RepositoryException(e);
        }

Examples of org.apache.marmotta.ldcache.backend.kiwi.sail.LDCachingKiWiSailConnection.commit()

                 */
                @Override
                protected void handleClose() throws RepositoryException {
                    super.handleClose();
                    try {
                        sailConnection.commit();
                        sailConnection.close();
                    } catch (SailException ex) {
                        throw new RepositoryException(ex);
                    }
                }

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

                    updateMetadata( new SnapshotArtifactRepositoryMetadata( artifact ), targetRepository, metadata,
                                    transaction );

                    if ( !dryrun )
                    {
                        transaction.commit();
                    }
                }
            }
        }
    }

Examples of org.apache.maven.archiva.transaction.CopyFileEvent.commit()

    {
        CopyFileEvent event = new CopyFileEvent( testSource, testDest, digesters );

        assertFalse( "Test that the destination is not yet created", testDest.exists() );

        event.commit();

        assertTrue( "Test that the destination is created", testDest.exists() );

        assertChecksumCommit( testDest );

Examples of org.apache.maven.archiva.transaction.CreateFileEvent.commit()

        CreateFileEvent event = new CreateFileEvent( "file contents", testFile, digesters );

        assertFalse( "Test file is not yet created", testFile.exists() );

        event.commit();

        assertTrue( "Test file has been created", testFile.exists() );

        assertChecksumCommit( testFile );
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.