Interface FieldReadable<T>
- All Known Subinterfaces:
ClassLoaderMarshaller,FieldSetMarshaller<T,,V> FieldSetMarshaller.Simple<T>,FieldSetMarshaller.Supplied<T,V>
- All Known Implementing Classes:
ComparatorMarshaller,DurationMarshaller,EnumSetFieldSetMarshaller,InetAddressMarshaller,LocalDateMarshaller,LocalTimeMarshaller,ModuleClassLoaderMarshaller,SimpleClassLoaderMarshaller,UUIDMarshaller,YearMarshaller,ZoneOffsetMarshaller
public interface FieldReadable<T>
Reads a single field of a field set from a reader.
- Author:
- Paul Ferraro
-
Method Summary
Modifier and TypeMethodDescriptionintReturns the number of fields in this field setdefault intnextIndex(int startIndex) Returns the index that should follow this field set.readFrom(ProtoStreamReader reader, int index, org.infinispan.protostream.descriptors.WireType type, T current) Reads a single field from the specified reader.
-
Method Details
-
readFrom
T readFrom(ProtoStreamReader reader, int index, org.infinispan.protostream.descriptors.WireType type, T current) throws IOException Reads a single field from the specified reader.- Parameters:
reader- a readerindex- the zero-based index, relative to this field set, of the field to be readtype- the wire type of the field to be readcurrent- the current value- Returns:
- the read value
- Throws:
IOException- if a field could not be read
-
nextIndex
default int nextIndex(int startIndex) Returns the index that should follow this field set.- Parameters:
startIndex- the starting index of this field set- Returns:
- the next index
-
getFields
int getFields()Returns the number of fields in this field set- Returns:
- a number of fields
-