Tabnine Logo
Extent.closeAll
Code IndexAdd Tabnine to your IDE (free)

How to use
closeAll
method
in
javax.jdo.Extent

Best Java code snippets using javax.jdo.Extent.closeAll (Showing top 13 results out of 315)

origin: tzaeschke/zoodb

  public void closeAll() {
    ext.closeAll();
  }
}
origin: tzaeschke/zoodb

  System.out.println("Person found: " + p.getName());
ext.closeAll();
origin: tzaeschke/zoodb

private void deleteAllBatched(PersistenceManager pm, Class<?> clazz) {
  int batchSize = 10000;
    int commitctr = 0;
    Extent<?> extent = pm.getExtent(clazz,false);
    Iterator<?> it = extent.iterator();
    while(it.hasNext()){
      pm.deletePersistent(it.next());
      if ( batchSize > 0  &&  ++commitctr >= batchSize){
        commitctr = 0;
        pm.currentTransaction().commit();
        pm.currentTransaction().begin();
      }
    }
    extent.closeAll();
 }

origin: tzaeschke/zoodb

@Test
public void testBarcelonaDelete(){
  PersistenceManager pm = TestTools.openPM();
  pm.currentTransaction().begin();
  Extent<TC4> extent = pm.getExtent(TC4.class, false);
  Iterator<TC4> it = extent.iterator();
  while(it.hasNext()){
    pm.deletePersistent(it.next());
    //addToCheckSum(5);
  }
  extent.closeAll();
  pm.currentTransaction().commit();
  TestTools.closePM();
}
origin: tzaeschke/zoodb

  @Override
  public void run() {
    Extent<TestSuper> ext = pm.getExtent(TestSuper.class);
    Iterator<TestSuper> iter = ext.iterator();
    while (iter.hasNext() && n < N/2) {
      pm.deletePersistent(iter.next());
      n++;
      if (n % COMMIT_INTERVAL == 0) {
        pm.currentTransaction().commit();
        pm.currentTransaction().begin();
        ext = pm.getExtent(TestSuper.class);
        iter = ext.iterator();
      }
    }
    ext.closeAll();
  }
});
origin: tzaeschke/zoodb

ext = pm.getExtent(TestClass.class);
assertTrue( ext.iterator().hasNext() );
ext.closeAll();
iter = ext.iterator();
assertTrue( iter.hasNext() );
ext.closeAll();
try {
  assertFalse(iter.hasNext());
origin: tzaeschke/zoodb

ext.closeAll();
origin: tzaeschke/zoodb

extent.closeAll();
origin: tzaeschke/zoodb

extent.closeAll();
origin: tzaeschke/zoodb

ex1.closeAll();
origin: tzaeschke/zoodb

ext3.closeAll();
origin: tzaeschke/zoodb

ext.closeAll();
origin: tzaeschke/zoodb

Extent<TestSerializer> ex = pm.getExtent(TestSerializer.class, false);
ex.iterator();
ex.closeAll();
pm.currentTransaction().commit();
TestTools.closePM();
javax.jdoExtentcloseAll

Javadoc

Close all Iterators associated with this Extent instance. Iterators closed by this method will return false to hasNext() and will throw NoSuchElementException on next(). The Extent instance can still be used as a parameter of Query.setExtent, and to get an Iterator.

Popular methods of Extent

  • getCandidateClass
    An Extent contains all instances of a particular class or interface in the data store; this method r
  • iterator
    Returns an iterator over all the instances in the Extent. The behavior of the returned iterator migh
  • hasSubclasses
    Returns whether this Extent was defined to contain subclasses.
  • getFetchPlan
    Get the fetch plan associated with this Extent.
  • getPersistenceManager
    An Extent is managed by a PersistenceManager; this method gives access to the owning PersistenceMana

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • onCreateOptionsMenu (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • Socket (java.net)
    Provides a client-side TCP socket.
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • JComboBox (javax.swing)
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now