Class StringPortability
java.lang.Object
org.terracotta.offheapstore.storage.portability.StringPortability
- All Implemented Interfaces:
Persistent, PersistentPortability<String>, Portability<String>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbootstrap(ObjectInput input) voidclose()decode(ByteBuffer buffer) Decodes aByteBufferto an object of typeT.Encodes an object of typeTas aByteBuffer.booleanequals(Object value, ByteBuffer readBuffer) Returns true if the encoded object once decoded would beObject.equals(Object)to the supplied object.voidflush()voidpersist(ObjectOutput output)
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
StringPortability
private StringPortability()
-
-
Method Details
-
encode
Description copied from interface:PortabilityEncodes an object of typeTas aByteBuffer.- Specified by:
encodein interfacePortability<String>- Parameters:
object- object to be encoded- Returns:
- the encoded object
-
decode
Description copied from interface:PortabilityDecodes aByteBufferto an object of typeT.- Specified by:
decodein interfacePortability<String>- Parameters:
buffer- bytes to decode- Returns:
- the decoded object
-
equals
Description copied from interface:PortabilityReturns true if the encoded object once decoded would beObject.equals(Object)to the supplied object.- Specified by:
equalsin interfacePortability<String>- Parameters:
value- object to compare toreadBuffer- buffer containing encoded object- Returns:
trueif the two parameters are "equal"
-
flush
- Specified by:
flushin interfacePersistent- Throws:
IOException
-
close
- Specified by:
closein interfacePersistent- Throws:
IOException
-
persist
- Specified by:
persistin interfacePersistent- Throws:
IOException
-
bootstrap
- Specified by:
bootstrapin interfacePersistent- Throws:
IOException
-