Examples of Commit()


Examples of org.apache.kahadb.page.Transaction.commit()

                while (!shutdown.get()) {
                    long c = counter;

                    String key = key(c);
                    index.put(tx, key, c);
                    tx.commit();
                    Thread.yield(); // This avoids consumer starvation..

                    onProduced(counter++);
                }

Examples of org.apache.lenya.cms.repository.Session.commit()

            Importer importer = new Importer(getManager(), getLogger());
            importer.importContent(defaultPub, area, path);

            assertTrue(area.getSite().contains("/tutorial"));

            session.commit();
        }

        Session aliceSession = login("alice");
        Publication alicePub = getPublication(aliceSession, "test");
        final SiteStructure authSite = alicePub.getArea("authoring").getSite();

Examples of org.apache.lucene.facet.taxonomy.TaxonomyWriter.commit()

      TaxonomyWriter taxo = new DirectoryTaxonomyWriter(pair.taxoDir, OpenMode.CREATE);
     
      populateIndex(iw, taxo, fip);
     
      // commit changes (taxonomy prior to search index for consistency)
      taxo.commit();
      iw.commit();
      taxo.close();
      iw.close();
     
      dirsPerPartitionSize.put(Integer.valueOf(partitionSize), pair);

Examples of org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter.commit()

      TaxonomyWriter taxo = new DirectoryTaxonomyWriter(pair.taxoDir, OpenMode.CREATE);
     
      populateIndex(iw, taxo, fip);
     
      // commit changes (taxonomy prior to search index for consistency)
      taxo.commit();
      iw.commit();
      taxo.close();
      iw.close();
     
      dirsPerPartitionSize.put(Integer.valueOf(partitionSize), pair);

Examples of org.apache.lucene.facet.taxonomy.lucene.LuceneTaxonomyWriter.commit()

    // we commit changes to the taxonomy index prior to committing them to
    // the search index.
    // this is important, so that all facets referred to by documents in the
    // search index
    // will indeed exist in the taxonomy index.
    taxo.commit();
    iw.commit();

    // close the taxonomy index and the index - all modifications are
    // now safely in the provided directories: indexDir and taxoDir.
    taxo.close();

Examples of org.apache.lucene.index.BlurIndexWriter.commit()

    BlurIndexWriter writer = _writer.get();
    writer.prepareCommit();
    trace1.done();

    Tracer trace2 = Trace.trace("commit");
    writer.commit();
    trace2.done();

    Tracer trace3 = Trace.trace("index refresh");
    DirectoryReader currentReader = _indexReader.get();
    DirectoryReader newReader = DirectoryReader.openIfChanged(currentReader);

Examples of org.apache.lucene.index.IndexReader.commit()

    if (iw != null) {
      iw.commit(commitUserData);
    } else {
      IndexReader r = getRunData().getIndexReader();
      if (r != null) {
        r.commit(commitUserData);
        r.decRef();
      } else {
        throw new IllegalStateException("neither IndexWriter nor IndexReader is currently open");
      }
    }

Examples of org.apache.lucene.index.IndexWriter.commit()

    Document[] docs = buildData();
   
    IndexWriter writer = new IndexWriter(idxDir,new StandardAnalyzer(Version.LUCENE_29),MaxFieldLength.UNLIMITED);
    writer.addDocument(docs[0]);
    writer.optimize();
    writer.commit();
   
    IndexReader idxReader = IndexReader.open(idxDir,true);
    BoboIndexReader boboReader = BoboIndexReader.getInstance(idxReader,_fconf);

   

Examples of org.apache.lucene.index.RandomIndexWriter.commit()

    doc = new Document();
    addGroupField(doc, groupField, "author1", canUseIDV);
    doc.add(new TextField("content", "some more random textual data", Field.Store.YES));
    doc.add(new Field("id", "3", customType));
    w.addDocument(doc);
    w.commit(); // To ensure a second segment

    // 3
    doc = new Document();
    addGroupField(doc, groupField, "author2", canUseIDV);
    doc.add(new TextField("content", "some random text", Field.Store.YES));

Examples of org.apache.lucene.replicator.IndexAndTaxonomyRevision.SnapshotDirectoryTaxonomyWriter.commit()

    Directory taxoDir = newDirectory();
    SnapshotDirectoryTaxonomyWriter taxoWriter = new SnapshotDirectoryTaxonomyWriter(taxoDir);
    try {
      indexWriter.addDocument(newDocument(taxoWriter));
      indexWriter.commit();
      taxoWriter.commit();
      Revision rev1 = new IndexAndTaxonomyRevision(indexWriter, taxoWriter);
      // releasing that revision should not delete the files
      rev1.release();
      assertTrue(indexDir.fileExists(IndexFileNames.SEGMENTS + "_1"));
      assertTrue(taxoDir.fileExists(IndexFileNames.SEGMENTS + "_1"));
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.