Package com.codecademy.eventhub.base

Examples of com.codecademy.eventhub.base.DB


  @Provides
  public DatedEventIndex getDatedEventIndex(
      @Named("eventhub.directory") String eventIndexDirectory) throws IOException {
    Options options = new Options();
    options.createIfMissing(true);
    DB db = new DB(
        JniDBFactory.factory.open(new File(eventIndexDirectory + "/dated_event_index.db"), options));

    return DatedEventIndex.create(db);
  }
View Full Code Here


      @Named("eventhub.directory") String eventIndexDirectory) throws IOException {
    //noinspection ResultOfMethodCallIgnored
    new File(eventIndexDirectory).mkdirs();
    Options options = new Options();
    options.createIfMissing(true);
    return new PropertiesIndex(new DB(
        JniDBFactory.factory.open(new File(eventIndexDirectory + "/properties_index.db"), options)));
  }
View Full Code Here

    String filename = userStorageDirectory + "/id_map.db";
    //noinspection ResultOfMethodCallIgnored
    new File(userStorageDirectory).mkdirs();
    Options options = new Options();
    options.createIfMissing(true);
    return IdMap.create(new DB(JniDBFactory.factory.open(new File(filename), options)));
  }
View Full Code Here

TOP

Related Classes of com.codecademy.eventhub.base.DB

Copyright © 2018 www.massapicom. 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.