com.appenginefan.toolkit.persistence
Class ProtocolBufferPersistence<T extends Message>
java.lang.Object
com.appenginefan.toolkit.persistence.MarshallingPersistence<T>
com.appenginefan.toolkit.persistence.ProtocolBufferPersistence<T>
- Type Parameters:
T - the type of protocol message that this
persistence is for
- All Implemented Interfaces:
- Persistence<T>
public class ProtocolBufferPersistence<T extends Message>
- extends MarshallingPersistence<T>
Persistence that uses googles protocol buffer framework
for efficient representation and serialization of data.
|
Method Summary |
protected byte[] |
makeArray(T nonNullValue)
|
protected T |
makeType(byte[] nonNullValue)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ProtocolBufferPersistence
public ProtocolBufferPersistence(Persistence<byte[]> backend,
T prototype)
- Constructor
- Parameters:
backend - a backend that stores serialized protocol
buffersprototype - a prototype instance of the generic type that
this peristence object is for.
makeArray
protected byte[] makeArray(T nonNullValue)
- Specified by:
makeArray in class MarshallingPersistence<T extends Message>
makeType
protected T makeType(byte[] nonNullValue)
- Specified by:
makeType in class MarshallingPersistence<T extends Message>