org.hibernate.search.indexes.serialization.spi

## Interface LuceneWorkSerializer

- All Superinterfaces:
    Service
  All Known Implementing Classes:
    LuceneWorkSerializerImpl

      public interface LuceneWorkSerializer
      extends Service

  Serialize `LuceneWork` instances. Needed for clustering where we need to serialize the work to remote nodes.

  Note:
  Implementations need to be threadsafe.

  Author:
    Sanne Grinovero <sanne@hibernate.org> (C) 2011 Red Hat Inc.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `describeSerializer()`
    `List<LuceneWork>` | `toLuceneWorks(byte[] data)` Convert a byte[] to a List of LuceneWork.
    `byte[]` | `toSerializedModel(List<LuceneWork> works)` Convert a List of LuceneWork into a byte[].

- - ### Method Detail

    - #### toSerializedModel

          byte[] toSerializedModel(List<LuceneWork> works)

      Convert a List of LuceneWork into a byte[].
      Parameters:
        `works` - the list of `LuceneWork`
      Returns:
        the list of `LuceneWork` as byte[]

    - #### toLuceneWorks

          List<LuceneWork> toLuceneWorks(byte[] data)

      Convert a byte[] to a List of LuceneWork.
      Parameters:
        `data` - the byte array to convert
      Returns:
        the list of `LuceneWork`

    - #### describeSerializer

          String describeSerializer()

      Returns:
        a short label of this implementation and optionally version

Copyright © 2006-2017 Red Hat, Inc. All Rights Reserved