Tabnine Logo
RecordIteratorImpl
Code IndexAdd Tabnine to your IDE (free)

How to use
RecordIteratorImpl
in
com.oberasoftware.jasdb.writer.transactional

Best Java code snippets using com.oberasoftware.jasdb.writer.transactional.RecordIteratorImpl (Showing top 4 results out of 315)

origin: oberasoftware/jasdb

@Override
public RecordIteratorImpl readAllRecords(int limit) throws DatastoreException {
  return new RecordIteratorImpl(this, HEADER_SIZE, limit);
}
origin: oberasoftware/jasdb

@Override
public boolean hasNext() {
  if(nextLoadedRecord == null) {
    loadNextRecord();
  }
  return nextLoadedRecord != null && (foundRecords <= limit || limit == -1);
}
origin: oberasoftware/jasdb

private void loadRecords() throws JasDBStorageException {
  for(RecordIteratorImpl recordIterator = writer.readAllRecords(); recordIterator.hasNext(); ) {
    RecordResultImpl recordResult = recordIterator.next();
    Entity entity = SimpleEntity.fromStream(recordResult.getStream());
    String type = entity.getValue(Constants.META_TYPE).toString();
    if(type.equals(Constants.INSTANCE_TYPE)) {
      InstanceMeta instance = InstanceMeta.fromEntity(entity);
      instanceMetaMap.put(instance.getInstanceId(), new MetaWrapper<>(instance, recordResult.getRecordPointer()));
    } else if(type.equals(Constants.BAG_TYPE)) {
      BagMeta bagMeta = BagMeta.fromEntity(entity);
      String bagId = getBagKey(bagMeta.getInstanceId(), bagMeta.getName());
      bagMetaMap.put(bagId, new MetaWrapper<>(bagMeta, recordResult.getRecordPointer()));
    } else if(metadataProviders.containsKey(type)) {
      metadataProviders.get(type).registerMetadataEntity(entity, recordResult.getRecordPointer());
    } else {
      throw new JasDBStorageException("Unable to load metadata record: " + entity.toString() + " unknown type: " + type);
    }
  }
}
origin: oberasoftware/jasdb

@Override
public RecordResultImpl next() {
  if(nextLoadedRecord == null) {
    loadNextRecord();
  }
  RecordResultImpl loadedRecord = nextLoadedRecord;
  nextLoadedRecord = null;
  return loadedRecord;
}
com.oberasoftware.jasdb.writer.transactionalRecordIteratorImpl

Most used methods

  • <init>
  • hasNext
  • loadNextRecord
  • next

Popular in Java

  • Making http requests using okhttp
  • setContentView (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • notifyDataSetChanged (ArrayAdapter)
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • JButton (javax.swing)
  • Top Vim 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