congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
BTreeIndex.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
com.oberasoftware.jasdb.core.index.btreeplus.BTreeIndex
constructor

Best Java code snippets using com.oberasoftware.jasdb.core.index.btreeplus.BTreeIndex.<init> (Showing top 4 results out of 315)

origin: oberasoftware/jasdb

private Index createInStore(String bagName, KeyInfo keyInfo) throws JasDBStorageException {
  if(!indexes.containsKey(bagName)) {
    loadIndexes(bagName);
  }
  Map<String, Index> bagIndexes = this.indexes.get(bagName);
  if(bagIndexes != null && !bagIndexes.containsKey(keyInfo.getKeyName())) {
    File indexFile = createIndexFile(bagName, keyInfo.getKeyName(), false);
    try {
      Index index = new BTreeIndex(indexFile, keyInfo);
      configureIndex(IndexTypes.BTREE, index);
      IndexDefinition definition = new IndexDefinition(keyInfo.getKeyName(), keyInfo.keyAsHeader(), keyInfo.valueAsHeader(), index.getIndexType());
      metadataStore.addBagIndex(instanceId, bagName, definition);
      bagIndexes.put(keyInfo.getKeyName(), index);
      return index;
    } catch(ConfigurationException e) {
      throw new JasDBStorageException("Unable to create index, configuration error", e);
    }
  } else if(bagIndexes != null){
    return bagIndexes.get(keyInfo.getKeyName());
  } else {
    return null;
  }
}
origin: oberasoftware/jasdb

private Index loadIndex(String bagName, IndexDefinition indexDefinition) throws JasDBStorageException {
  try {
    KeyInfo keyInfo = new KeyInfoImpl(indexDefinition.getHeaderDescriptor(), indexDefinition.getValueDescriptor());
    File indexFile = createIndexFile(bagName, indexDefinition.getIndexName(), false);
    switch(IndexTypes.getTypeFor(indexDefinition.getIndexType())) {
      case BTREE:
        LOG.debug("Loaded BTree Index for key: {}", indexDefinition.getIndexName());
        Index btreeIndex = new BTreeIndex(indexFile, keyInfo);
        return configureIndex(IndexTypes.BTREE, btreeIndex);
      default:
        throw new JasDBStorageException("Reading from this index type: " + indexDefinition.getIndexName() +
            " is not supported");
    }
  } catch(ConfigurationException e) {
    throw new JasDBStorageException("Unable to load index, invalid configuration", e);
  }
}
origin: oberasoftware/jasdb

@Override
public void openWriter() throws JasDBStorageException {
  this.keyInfo = new KeyInfoImpl(new SimpleIndexField("__ID", new UUIDKeyType()), new SimpleIndexField("RECORD_POINTER", new LongKeyType()));
  this.index = new BTreeIndex(indexLocation, keyInfo);
  this.writer.openWriter();
  this.index.openIndex();
}
origin: oberasoftware/jasdb

@Override
public void openWriter() throws JasDBStorageException {
  this.keyInfo = new KeyInfoImpl(new SimpleIndexField("__ID", new UUIDKeyType()), new SimpleIndexField("data", new DataKeyType()));
  try {
    this.index = new BTreeIndex(recordStorageLocation, keyInfo);
    this.index.openIndex();
  } catch(OverlappingFileLockException e) {
    throw new RecordStoreInUseException("Record datastore: " + recordStorageLocation + " is already in use, cannot be opened");
  }
}
com.oberasoftware.jasdb.core.index.btreeplusBTreeIndex<init>

Popular methods of BTreeIndex

  • closeIndexResources
  • doLeaveBlockInsert
  • doLeaveBlockRemove
  • doLeaveBlockUpdate
  • flushIndex
  • handleEqualsToRange
  • initializeIndex
  • openIndex
  • resetIndex

Popular in Java

  • Start an intent from android
  • onRequestPermissionsResult (Fragment)
  • getSupportFragmentManager (FragmentActivity)
  • runOnUiThread (Activity)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • Reference (javax.naming)
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • 21 Best IntelliJ Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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