Package org.jgroups.util
Class LongSizeStreamable
java.lang.Object
org.jgroups.util.LongSizeStreamable
- All Implemented Interfaces:
LongSupplier,SizeStreamable,Streamable
- Since:
- 5.2
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongvoidRead the state of the current object (including superclasses) from instream Note that the input stream must not be closedintReturns the size (in bytes) of the marshalled objectvoidwriteTo(DataOutput out) Write the entire state of the current object (including superclasses) to outstream.
-
Field Details
-
value
private long value
-
-
Constructor Details
-
LongSizeStreamable
public LongSizeStreamable() -
LongSizeStreamable
public LongSizeStreamable(long value)
-
-
Method Details
-
serializedSize
public int serializedSize()Description copied from interface:SizeStreamableReturns the size (in bytes) of the marshalled object- Specified by:
serializedSizein interfaceSizeStreamable
-
writeTo
Description copied from interface:StreamableWrite the entire state of the current object (including superclasses) to outstream. Note that the output stream must not be closed- Specified by:
writeToin interfaceStreamable- Throws:
IOException
-
readFrom
Description copied from interface:StreamableRead the state of the current object (including superclasses) from instream Note that the input stream must not be closed- Specified by:
readFromin interfaceStreamable- Throws:
IOExceptionClassNotFoundException
-
getAsLong
public long getAsLong()- Specified by:
getAsLongin interfaceLongSupplier
-