org.hibernate.search.indexes.serialization.impl
Class PluggableSerializationLuceneWorkSerializer

java.lang.Object
  extended by org.hibernate.search.indexes.serialization.impl.PluggableSerializationLuceneWorkSerializer
All Implemented Interfaces:
LuceneWorkSerializer

public class PluggableSerializationLuceneWorkSerializer
extends Object
implements LuceneWorkSerializer

Serializes List back and forth using a pluggable SerializerProvider. This class control the over all traversal process and delegates true serialization work to the SerializerProvider.

Author:
Emmanuel Bernard

Constructor Summary
PluggableSerializationLuceneWorkSerializer(SerializationProvider provider, SearchFactoryImplementor searchFactory)
           
 
Method Summary
 List<LuceneWork> toLuceneWorks(byte[] data)
          Convert a byte[] to a List of LuceneWork (assuming the same SerializationProvider is used of course)
 byte[] toSerializedModel(List<LuceneWork> works)
          Convert a List of LuceneWork into a byte[]
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PluggableSerializationLuceneWorkSerializer

public PluggableSerializationLuceneWorkSerializer(SerializationProvider provider,
                                                  SearchFactoryImplementor searchFactory)
Method Detail

toSerializedModel

public byte[] toSerializedModel(List<LuceneWork> works)
Convert a List of LuceneWork into a byte[]

Specified by:
toSerializedModel in interface LuceneWorkSerializer

toLuceneWorks

public List<LuceneWork> toLuceneWorks(byte[] data)
Convert a byte[] to a List of LuceneWork (assuming the same SerializationProvider is used of course)

Specified by:
toLuceneWorks in interface LuceneWorkSerializer


Copyright © 2006-2012 Red Hat Middleware, LLC. All Rights Reserved