Package com.barchart.proto.buf.inst

Examples of com.barchart.proto.buf.inst.InstrumentDefinition


    byte[] key = guid.toString().getBytes();
    DatabaseEntry result = new DatabaseEntry();
    db.get(txn, new DatabaseEntry(key), result, null);
    txn.commit();
   
    InstrumentDefinition resInst;
    byte[] resData = result.getData();
   
    if(resData == null || resData.length == 0) {
      return Instrument.NULL;
    }
View Full Code Here


        inStream = zFile.getInputStream(entry);
       
        map.clear();
       
        long counter = 0;
        InstrumentDefinition def = null;
        while(true) {
          def = null;
         
          try {
            def = InstrumentDefinition.
                parseDelimitedFrom(inStream);
          } catch (final Exception e) {
            break;
          }
         
          if(def!= null) {
           
            if(def.hasSymbol()) {
              map.put(def.getSymbol(), def);
            }
           
            if(counter % 100000 == 0) {
              log.debug("Instrument DB build count " + counter);
            }
View Full Code Here

   
    if(instrument != null) {
      return instrument;
    }
   
    final InstrumentDefinition instDef = db.get(symbol.toString());
   
    if(cache.size() % 10000 == 0) {
      log.debug("Cache size = {}", cache.size());
    }
   
View Full Code Here

 
  private void populateDB(final InputStream inStream) {
   
    long counter = 0;
    while(true) {
      InstrumentDefinition def;
     
      try {
        def = InstrumentDefinition.
            parseDelimitedFrom(inStream);
      } catch (Exception e) {
        e.printStackTrace();
        break;
      }
     
      if(def!= null) {
       
        if(def.hasSymbol()) {
          map.put(def.getSymbol(), def);
        }
       
        if(counter % 10000 == 0) {
          System.out.println("Build count " + counter);
        }
View Full Code Here

    byte[] key = guid.toString().getBytes();
    DatabaseEntry result = new DatabaseEntry();
    db.get(txn, new DatabaseEntry(key), result, null);
    txn.commit();
   
    InstrumentDefinition resInst;
    byte[] resData = result.getData();
   
    if(resData == null || resData.length == 0) {
      return Instrument.NULL;
    }
View Full Code Here

        final ZipFile zFile= new ZipFile(instDef);
        final ZipEntry entry = zFile.entries().nextElement();
        inStream = zFile.getInputStream(entry);
       
        long counter = 0;
        InstrumentDefinition def = null;
        while(true) {
          def = null;
         
          try {
            def = InstrumentDefinition.
                parseDelimitedFrom(inStream);
          } catch (final Exception e) {
            break;
          }
         
          if(def!= null) {
           
            if(def.hasSymbol()) {
              map.put(def.getSymbol(), def);
            }
           
            if(counter % 100000 == 0) {
              log.debug("Instrument DB build count " + counter);
            }
View Full Code Here

   
    if(instrument != null) {
      return instrument;
    }
   
    final InstrumentDefinition instDef = db.get(symbol.toString());
   
    if(cache.size() % 10000 == 0) {
      log.debug("Cache size = {}", cache.size());
    }
   
View Full Code Here

 
  private void populateDB(final InputStream inStream) {
   
    long counter = 0;
    while(true) {
      InstrumentDefinition def;
     
      try {
        def = InstrumentDefinition.
            parseDelimitedFrom(inStream);
      } catch (Exception e) {
        e.printStackTrace();
        break;
      }
     
      if(def!= null) {
       
        if(def.hasSymbol()) {
          map.put(def.getSymbol(), def);
        }
       
        if(counter % 10000 == 0) {
          System.out.println("Build count " + counter);
        }
View Full Code Here

TOP

Related Classes of com.barchart.proto.buf.inst.InstrumentDefinition

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.