congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
com.ociweb.pronghorn.util
Code IndexAdd Tabnine to your IDE (free)

How to use com.ociweb.pronghorn.util

Best Java code snippets using com.ociweb.pronghorn.util (Showing top 20 results out of 315)

origin: com.ociweb/pronghorn-pipes

public void convert(CharSequence textBlock, EncodingTransform transform, EncodingStorage storage) {
  
  cleanInternalState();
  DataOutputBlobWriter<RawDataSchema> outputStream = openTransform(textBlock);
  transform.transform(templateParserReader, outputStream);
  closeTransform(outputStream);
  storage.store(workingPipeB);
  closeStore();
  
}
origin: com.ociweb/PronghornPipes

private void visitorBranch(TrieParser that, ByteSquenceVisitor visitor, byte[] source, int localSourcePos,
    int sourceLength, int sourceMask, final long unfoundResult, short[] data) {
  if (this.runLength<sourceLength) {          
    //TrieMap data
    final short[] data1 = data;
    final int p = 1+pos;
    pos = (0==(0xFFFFFF&TrieParser.computeJumpMask((short) source[sourceMask & localSourcePos], data[pos]))) ? 3+pos :  2+p+((((int)data1[p])<<15) | (0x7FFF&data1[1+p]));
    visit(that, pos, visitor, source, localSourcePos, sourceLength, sourceMask, unfoundResult);//only that jump
  } else{
    return;
  }
}
origin: com.ociweb/PronghornPipes

private void visitSafeEnd(TrieParserVisitor pv, int i, byte[] buffer, int bufferPosition) {
  assert(TYPE_SAFE_END == data[i]);
  i++;//skip over the ID;
  
  int s = SIZE_OF_RESULT;
  long result = 0;
  while (--s >= 0) {
    result = (result<<8) | ((long)data[i++]);
  } 
  pv.visit(buffer, bufferPosition, result);
  visitPatterns(pv,i,buffer,bufferPosition);
  
}
origin: oci-pronghorn/GreenLightning

public List<PrivateTopic> getPrivateTopicsFromSource(String source) {
      
  byte[] bytes = CharSequenceToUTF8Local.get().convert(source).append(" ").asBytes();		
  int sourceId = (int)TrieParserReader.query(TrieParserReaderLocal.get(), privateTopicSource, bytes, 0, bytes.length, Integer.MAX_VALUE);
  List<PrivateTopic> result = (sourceId<0) ? Collections.EMPTY_LIST : privateSourceTopics.get(sourceId);		
  return result;
}

origin: oci-pronghorn/GreenLightning

/**
 *
 * @param username used for basic authorization
 * @param password used for basic authorization
 */
public BasicAuthorization(String username, String password) {
  backing = CharSequenceToUTF8Local.get()
            .convert(username)
            .append(":")
            .convert(password).asBytes();
  
}
origin: oci-pronghorn/Pronghorn

private static void appendVolume(AppendableByteWriter<?> target, long traf) {
  if (traf>9999) {
    Appendables.appendValue(target.append("Vol:"), traf);
  } else {
    Appendables.appendFixedDecimalDigits(target.append("Vol:"), traf, 1000);
  }
}
origin: com.ociweb/PronghornPipes

public long fieldLookup(CharSequence sequence, int struct) {
  assert ((IS_STRUCT_BIT&struct) !=0 ) : "Struct Id must be passed in";
  TrieParserReader reader = TrieParserReaderLocal.get();
  return TrieParserReader.query(reader, fields[STRUCT_MASK&struct], sequence);
}
 
origin: com.ociweb/PronghornPipes

public int valueOf(byte[] data, int offset, int length, int mask) {        
  int value = (int)TrieParserReader.query(reader, trie, data, offset, length, mask, -1);
  if (value>0) {
    return value;
  } else {
    trie.setValue(data, offset, length, mask, ++squenceCount);
    return squenceCount;
  } 
}
 
origin: oci-pronghorn/Pronghorn

private static int indexOfMatchInArray(short value, short[] data, int i) {
  if (1==i) {
    return Branchless.ifEquals(value, data[0], 0, -1);
    //return (value==data[0]) ? 0 : -1;
  }
  return indexOfMatchInArrayScan(value, data, i);
}
origin: com.ociweb/pronghorn-pipes

public static AppendableProxy join(Appendable ... targets) {
  if (targets.length==1) {
    return new AppendableProxy(targets[0]);
  } else {
    return new AppendablesProxy(targets);
  }
}
origin: oci-pronghorn/Pronghorn

public static long query(TrieParserReader reader, TrieParser trie, 
      byte[] source, int sourcePos, long sourceLength, int sourceMask, 
      final long unfoundResult, final long noMatchResult) {

  return (TrieParser.getLimit(trie)>0) ? query2(reader, trie, source, sourcePos, sourceLength, sourceMask, unfoundResult, noMatchResult): unfoundResult;
}
origin: oci-pronghorn/Pronghorn

public void convert(CharSequence textBlock, EncodingTransform transform, EncodingStorage storage) {
  
  cleanInternalState();
  DataOutputBlobWriter<RawDataSchema> outputStream = openTransform(textBlock);
  transform.transform(templateParserReader, outputStream);
  closeTransform(outputStream);
  storage.store(workingPipeB);
  closeStore();
  
}
origin: oci-pronghorn/Pronghorn

public long fieldLookup(byte[] source, int pos, int len, int mask, int structId) {
  assert ((IS_STRUCT_BIT&structId) !=0 ) : "Struct Id must be passed in";
  assert (structId>=0) : "Bad Struct ID "+structId;
  TrieParserReader reader = TrieParserReaderLocal.get();
  return TrieParserReader.query(reader, fields[STRUCT_MASK&structId], source, pos, len, mask);
}

origin: com.ociweb/pronghorn-pipes

private void visitorBranch(TrieParser that, ByteSquenceVisitor visitor, byte[] source, int localSourcePos,
    int sourceLength, int sourceMask, final short[] data) {
  if (this.runLength<sourceLength) {          
    //TrieMap data
    final int p = 1+pos;
    pos = (0==(0xFFFFFF&TrieParser.computeJumpMask((short) source[sourceMask & localSourcePos], data[pos]))) ? 3+pos :  2+p+((((int)data[p])<<15) | (0x7FFF&data[1+p]));
    visit(that, pos, visitor, source, localSourcePos, sourceLength, sourceMask, this.unfoundConstant, this.noMatchConstant);//only that jump
  } else{
    return;
  }
}

origin: com.ociweb/pronghorn-pipes

private void visitSafeEnd(TrieParserVisitor pv, int i, byte[] buffer, int bufferPosition) {
  assert(TYPE_SAFE_END == data[i]);
  i++;//skip over the ID;
  
  int s = SIZE_OF_RESULT;
  long result = 0;
  while (--s >= 0) {
    result = (result<<8) | ((long)data[i++]);
  } 
  pv.visit(buffer, bufferPosition, result);
  visitPatterns(pv,i,buffer,bufferPosition);
  
}
origin: com.ociweb/PronghornPipes

private static int indexOfMatchInArray(short value, short[] data, int i) {
  if (1==i) {
    Branchless.ifEquals(value, data[0], 0, -1);
    //return (value==data[0]) ? 0 : -1;
  }
  return indexOfMatchInArrayScan(value, data, i);
}
origin: com.ociweb/PronghornPipes

public void convert(CharSequence textBlock, EncodingTransform transform, EncodingStorage storage) {
  
  cleanInternalState();
  DataOutputBlobWriter<RawDataSchema> outputStream = openTransform(textBlock);
  transform.transform(templateParserReader, outputStream);
  closeTransform(outputStream);
  storage.store(workingPipeB);
  closeStore();
  
}
origin: oci-pronghorn/Pronghorn

public long fieldLookup(CharSequence sequence, int structId) {
  assert ((IS_STRUCT_BIT&structId) !=0 ) : "Struct Id must be passed in";
  assert (structId>=0) : "Bad Struct ID "+structId;
  return TrieParserReader.query(TrieParserReaderLocal.get(), fields[STRUCT_MASK&structId], sequence);
}

origin: oci-pronghorn/Pronghorn

private void visitorBranch(TrieParser that, ByteSquenceVisitor visitor, byte[] source, int localSourcePos,
    int sourceLength, int sourceMask, final short[] data) {
  if (this.runLength<sourceLength) {          
    //TrieMap data
    final int p = 1+pos;
    pos = (0==(0xFFFFFF&TrieParser.computeJumpMask((short) source[sourceMask & localSourcePos], data[pos]))) ? 3+pos :  2+p+((((int)data[p])<<15) | (0x7FFF&data[1+p]));
    visit(that, pos, visitor, source, localSourcePos, sourceLength, sourceMask, this.unfoundConstant, this.noMatchConstant);//only that jump
  } else{
    return;
  }
}

origin: oci-pronghorn/Pronghorn

private void visitSafeEnd(TrieParserVisitor pv, int i, byte[] buffer, int bufferPosition) {
  assert(TYPE_SAFE_END == data[i]);
  i++;//skip over the ID;
  
  int s = SIZE_OF_RESULT;
  long result = 0;
  while (--s >= 0) {
    result = (result<<8) | ((long)data[i++]);
  } 
  pv.visit(buffer, bufferPosition, result);
  visitPatterns(pv,i,buffer,bufferPosition);
  
}
com.ociweb.pronghorn.util

Most used classes

  • Appendables
    Garbage free single pass utilities for building up text. The API follows a fluent pattern where ever
  • AppendableProxy
  • TrieParser
    Optimized for fast lookup and secondarily size. Inserts may require data copy and this could be opti
  • TrieParserReader
  • AppendableBuilder
  • TrieParserReaderLocal,
  • CharSequenceToUTF8,
  • CharSequenceToUTF8Local,
  • Decimal,
  • ArrayGrow,
  • Blocker,
  • BloomFilter,
  • EncodingConverter,
  • MainArgs,
  • RunningStdDev,
  • PMath,
  • JSONParser,
  • JSONStreamParser,
  • JSONStreamVisitorToChannel
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