public class JavolutionTranscoder extends Object implements SessionAttributesTranscoder
net.spy.memcached.transcoders.Transcoder that serializes catalina
StandardSessions using Javolutions xml data binding facilities.
Objects are serialized to/from xml using javolutions built in
XMLFormats for standard types, custom/user types are bound using the
ReflectionFormat.
Additionally it's worth to note that cyclic dependencies are supported.
| Constructor and Description |
|---|
JavolutionTranscoder(ClassLoader classLoader,
boolean copyCollectionsForSerialization,
CustomXMLFormat<?>... customFormats)
Constructor.
|
JavolutionTranscoder(MemcachedSessionService.SessionManager manager)
Constructor.
|
JavolutionTranscoder(MemcachedSessionService.SessionManager manager,
boolean copyCollectionsForSerialization,
CustomXMLFormat<?>... customFormats)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
ConcurrentMap<String,Object> |
deserializeAttributes(byte[] in)
Get the object represented by the given serialized bytes.
|
byte[] |
serializeAttributes(MemcachedBackupSession session,
ConcurrentMap<String,Object> attributes) |
public JavolutionTranscoder(MemcachedSessionService.SessionManager manager)
manager - the managerpublic JavolutionTranscoder(MemcachedSessionService.SessionManager manager, boolean copyCollectionsForSerialization, CustomXMLFormat<?>... customFormats)
manager - the managercopyCollectionsForSerialization - specifies, if iterating over collection elements shall be done
on a copy of the collection or on the collection itselfcustomFormats - a list of CustomXMLFormats or null.public JavolutionTranscoder(ClassLoader classLoader, boolean copyCollectionsForSerialization, CustomXMLFormat<?>... customFormats)
classLoader - the classLoadercopyCollectionsForSerialization - specifies, if iterating over collection elements shall be done
on a copy of the collection or on the collection itselfcustomFormats - a list of CustomXMLFormats or null.public byte[] serializeAttributes(MemcachedBackupSession session, ConcurrentMap<String,Object> attributes)
serializeAttributes in interface SessionAttributesTranscoderpublic ConcurrentMap<String,Object> deserializeAttributes(byte[] in)
deserializeAttributes in interface SessionAttributesTranscoderin - the bytes to deserializeCopyright © 2009-2016. All Rights Reserved.