Tabnine Logo
com.ociweb.pronghorn.struct
Code IndexAdd Tabnine to your IDE (free)

How to use com.ociweb.pronghorn.struct

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

origin: com.ociweb/pronghorn-pipes

public StructBuilder addField(CharSequence fieldName, 
    StructType fieldType, 
    Object assoc) {
  return addField(fieldName, fieldType, 0, assoc);
}
origin: com.ociweb/PronghornPipes

public int addStruct(byte[][] fieldNames, 
    StructType[] fieldTypes //all fields are precede by array count byte
    
    ) {
  return addStruct(fieldNames, fieldTypes, null, null);
}
 
origin: com.ociweb/pronghorn-pipes

public void visitAssociatedObject(int structId, AssocVisitor visitor) {
  int structIdx = StructRegistry.STRUCT_MASK&structId;
      
  Object[]   objects = fieldLocals[structIdx];
  int[]         dims = fieldDims[structIdx];
  StructType[] types = fieldTypes[structIdx];
          
  for(int i=0; i<objects.length; i++) {
    
    if (null != objects[i]) {					
      visitor.visit(objects[i],dims[i],types[i]);
    }
  
  }
}

origin: oci-pronghorn/Pronghorn

@Override
public CompositeRouteFinish associatedObject(String key, Object object) {		
  long fieldLookup = scs.registry.fieldLookup(key, structId);
  assert(-1 != fieldLookup) : "Unable to find associated key "+key;
  scs.registry.setAssociatedObject(fieldLookup, object);
  
  assert(fieldLookup == scs.registry.fieldLookupByIdentity(object, structId));
  
  return this;
}
origin: com.ociweb/pronghorn-pipes

public StructRegistry merge(StructRegistry source) {
  
  StructRegistry result = new StructRegistry();
  
  for(int i=0; i<structCount; i++) {			
    maxDims(fieldDims[i]);
    result.addStruct(fieldNames[i], fieldTypes[i], fieldDims[i]);			
  }
  for(int i=0; i<source.structCount; i++) {			
    result.addStruct(source.fieldNames[i], source.fieldTypes[i], source.fieldDims[i]);			
  }    
  
  return result;
}

origin: com.ociweb/PronghornPipes

public boolean setAssociatedObject(final long id, Object localObject) {
  assert(null!=localObject) : "must not be null, not supported";
  
  int structIdx = extractStructId(id);
  int fieldIdx = extractFieldPosition(id);
  
  return setAssoc(localObject, structIdx, fieldIdx);
}
 
origin: com.ociweb/PronghornPipes

public <T> boolean identityVisit(DataInputBlobReader<?> reader, T attachedObject, StructFieldVisitor<T> visitor) {
  int structId = DataInputBlobReader.getStructType(reader);
  
  int idx =  StructRegistry.FIELD_MASK & (int)fieldLookupByIdentity(attachedObject, structId);
  if (idx>=0) {
    DataInputBlobReader.position(reader, DataInputBlobReader.readFromLastInt(reader, idx));
    visitor.read((T)(fieldLocals[structId][idx]), reader);
    return true;
  } else {
    return false;
  }
}
origin: com.ociweb/PronghornPipes

public <T extends Object> T getAssociatedObject(long fieldId) {
  assert(fieldId>=0) : "bad fieldId";
  return (T) this.fieldLocals[extractStructId(fieldId)][extractFieldPosition(fieldId)];
}
 
origin: com.ociweb/PronghornPipes

private void grow(int records) {
  if (records>fields.length) {
    int newSize = records*2;
    
    fields             = grow(newSize, fields);
    fieldNames         = grow(newSize, fieldNames);
    fieldTypes         = grow(newSize, fieldTypes);
    fieldDims          = grow(newSize, fieldDims);
    fieldLocals        = grow(newSize, fieldLocals);
    fieldAttachedIndex = grow(newSize, fieldAttachedIndex);	
  }
}
origin: com.ociweb/PronghornPipes

private void visitSingleBlob(StructBlobListener visitor, int totalCount,
    final int[] curPos, final int[] curSize, int c) {
  
  visitor.value(channelReader, curPos, curSize, c, totalCount);

}
/**
origin: com.ociweb/PronghornPipes

public StructRegistry merge(StructRegistry source) {
  
  StructRegistry result = new StructRegistry();
  
  for(int i=0; i<structCount; i++) {			
    maxDims(fieldDims[i]);
    result.addStruct(fieldNames[i], fieldTypes[i], fieldDims[i]);			
  }
  for(int i=0; i<source.structCount; i++) {			
    result.addStruct(source.fieldNames[i], source.fieldTypes[i], source.fieldDims[i]);			
  }    
  
  return result;
}
 
origin: oci-pronghorn/Pronghorn

public StructBuilder addField(CharSequence fieldName, 
    StructType fieldType, 
    Object assoc) {
  return addField(fieldName, fieldType, 0, assoc);
}
origin: com.ociweb/PronghornPipes

public int addStruct(byte[][] fieldNames, 
    StructType[] fieldTypes, //all fields are precede by array count byte
    int[] fieldDims //Dimensionality, should be 0 for simple objects.
    ) {
  return addStruct(fieldNames, fieldTypes, fieldDims, null);
}
 
origin: oci-pronghorn/Pronghorn

public void visitAssociatedObject(int structId, AssocVisitor visitor) {
  int structIdx = StructRegistry.STRUCT_MASK&structId;
      
  Object[]   objects = fieldLocals[structIdx];
  int[]         dims = fieldDims[structIdx];
  StructType[] types = fieldTypes[structIdx];
          
  for(int i=0; i<objects.length; i++) {
    
    if (null != objects[i]) {					
      visitor.visit(objects[i],dims[i],types[i]);
    }
  
  }
}

origin: com.ociweb/pronghorn-pipes

public StructBuilder addField(CharSequence fieldName, 
               StructType fieldType) {
  return addField(fieldName, fieldType, 0, null);
}

origin: com.ociweb/PronghornPipes

public int addStruct(
    byte[][] fieldNames, 
    StructType[] fieldTypes, //all fields are precede by array count byte
    int[] fieldDim, //Dimensionality, should be 0 for simple objects.
    Object[] fieldAssoc
    ) {
  return addStruct(null,fieldNames,fieldTypes,fieldDim,fieldAssoc);
}
 
origin: oci-pronghorn/Pronghorn

public StructBuilder addField(CharSequence fieldName, 
    StructType fieldType, 
    int fieldDim) {
  return addField(fieldName,fieldType,fieldDim, null);
}

origin: com.ociweb/PronghornPipes

public StructBuilder addField(CharSequence fieldName, 
    StructType fieldType, 
    int fieldDim) {
  return addField(fieldName,fieldType,fieldDim, null);
}
 
origin: com.ociweb/PronghornPipes

public StructBuilder addField(CharSequence fieldName, 
    StructType fieldType, 
    Object assoc) {
  return addField(fieldName, fieldType, 0, assoc);
}
origin: com.ociweb/pronghorn-pipes

public StructBuilder addField(CharSequence fieldName, 
    StructType fieldType, 
    int fieldDim) {
  return addField(fieldName,fieldType,fieldDim, null);
}

com.ociweb.pronghorn.struct

Most used classes

  • StructRegistry
  • StructBuilder
  • AssocVisitor
  • ByteSequenceValidator
  • DecimalValidator
  • StructBlobListener,
  • StructBooleanListener,
  • StructByteListener,
  • StructDecimalListener,
  • StructDoubleListener,
  • StructFieldVisitor,
  • StructFloatListener,
  • StructIntListener,
  • StructLongListener,
  • StructRationalListener,
  • StructShortListener,
  • StructTextListener,
  • StructType
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