Package org.apache.solr.common.util
Interface DataEntry
- 
- All Known Implementing Classes:
- FastJavaBinDecoder.EntryImpl
 
 public interface DataEntryThis represents a data entry in the payload/stream. There are multiple ways to consume the data entry: 1) listen to it, if it's a container object, and get callbacks for each sub-entry 2) read as an object using the {val()} method. Please note that it creates objects and expect more memory usage 3) read the corresponding primitive value Do not keep a reference of this Object beyond the scope where it is called. Read the relevant data out.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Interface Description static interfaceDataEntry.EntryListenerstatic interfaceDataEntry.FastDecoderstatic classDataEntry.TypeThe types are a superset of json
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description booleanboolVal()Objectctx()This is the object shared in the parent container in the {listenContainer(Object, EntryListener)} methodintdepth()Depth of this Object.doubledoubleVal()floatfloatVal()longindex()The index of this entry in the containerintintVal()booleanisKeyValEntry()If this object is a key value entry.intlength()If it is a non-primitive type and size is known in advancevoidlistenContainer(Object ctx, DataEntry.EntryListener listener)Register a listener to get callbacks for all entrieslonglongVal()Objectmetadata()Some Objects may have metadata.CharSequencename()The name, if this is a map entry , else it returns a nullDataEntryparent()If this is a child of another container object this returns a non-null valuedefault StringstrValue()DataEntry.Typetype()The data typeObjectval()The object value
 
- 
- 
- 
Method Detail- 
typeDataEntry.Type type() The data type
 - 
indexlong index() The index of this entry in the container
 - 
intValint intVal() 
 - 
longVallong longVal() 
 - 
floatValfloat floatVal() 
 - 
doubleValdouble doubleVal() 
 - 
boolValboolean boolVal() 
 - 
strValuedefault String strValue() 
 - 
valObject val() The object value
 - 
listenContainervoid listenContainer(Object ctx, DataEntry.EntryListener listener) Register a listener to get callbacks for all entries- Parameters:
- ctx- This is any object that should be shared with the child entry callbacks
- listener- The listener that handles each entry in this container
 
 - 
metadataObject metadata() Some Objects may have metadata. usually there is none
 - 
depthint depth() Depth of this Object. The root most object has a depth of 1
 - 
parentDataEntry parent() If this is a child of another container object this returns a non-null value- Returns:
- the parent container object
 
 - 
ctxObject ctx() This is the object shared in the parent container in the {listenContainer(Object, EntryListener)} method
 - 
lengthint length() If it is a non-primitive type and size is known in advanceif it's a map/list, it's the no:of items in this container if it's a { CharSequence} or byte[] , it's the no:of bytes in the stream- Returns:
- a number greater than or equal to zero if the size is known, -1 if unknown
 
 - 
isKeyValEntryboolean isKeyValEntry() If this object is a key value entry. key value entries have name
 - 
nameCharSequence name() The name, if this is a map entry , else it returns a null
 
- 
 
-