org.terracotta.offheapstore.storage.portability
Class StringPortability
java.lang.Object
org.terracotta.offheapstore.storage.portability.StringPortability
- All Implemented Interfaces:
- Persistent, PersistentPortability<String>, Portability<String>
public class StringPortability
- extends Object
- implements PersistentPortability<String>
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INSTANCE
public static final StringPortability INSTANCE
encode
public ByteBuffer encode(String object)
- Description copied from interface:
Portability
- Encodes an object of type
T as a ByteBuffer.
- Specified by:
encode in interface Portability<String>
- Parameters:
object - object to be encoded
- Returns:
- the encoded object
decode
public String decode(ByteBuffer buffer)
- Description copied from interface:
Portability
- Decodes a
ByteBuffer to an object of type T.
- Specified by:
decode in interface Portability<String>
- Parameters:
buffer - bytes to decode
- Returns:
- the decoded object
equals
public boolean equals(Object value,
ByteBuffer readBuffer)
- Description copied from interface:
Portability
- Returns true if the encoded object once decoded would be
Object.equals(Object) to the supplied object.
- Specified by:
equals in interface Portability<String>
- Parameters:
value - object to compare toreadBuffer - buffer containing encoded object
- Returns:
true if the two parameters are "equal"
flush
public void flush()
throws IOException
- Specified by:
flush in interface Persistent
- Throws:
IOException
close
public void close()
throws IOException
- Specified by:
close in interface Persistent
- Throws:
IOException
persist
public void persist(ObjectOutput output)
throws IOException
- Specified by:
persist in interface Persistent
- Throws:
IOException
bootstrap
public void bootstrap(ObjectInput input)
throws IOException
- Specified by:
bootstrap in interface Persistent
- Throws:
IOException
Copyright © 2016. All rights reserved.