|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.hibernate.search.backend.impl.jgroups.MessageSerializationHelper
public class MessageSerializationHelper
While we use the configured LuceneWorkSerializer to serialize the Work queue, the JGroups backend needs to prefix the stream with the index name.
Constructor Summary | |
---|---|
MessageSerializationHelper()
|
Method Summary | |
---|---|
static String |
extractIndexName(byte[] rawBuffer)
Extracts the string only from the header of a byte array. |
static byte[] |
extractSerializedQueue(byte[] rawBuffer)
Inverse operation of {@link #prependString(String, byte[]): extracts the original buffer discarding the prefixed string. |
static int |
fromByteToInt(byte b)
|
static byte |
fromIntToByte(int i)
|
static byte[] |
prependString(String name,
byte[] data)
Byte encodes a String as a prefix for an existing byte buffer |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MessageSerializationHelper()
Method Detail |
---|
public static byte[] prependString(String name, byte[] data)
name
- the string to encodedata
- the existing buffer
public static String extractIndexName(byte[] rawBuffer)
prependString(String, byte[])
The buffer is not altered.
rawBuffer
-
public static byte[] extractSerializedQueue(byte[] rawBuffer)
rawBuffer
-
public static int fromByteToInt(byte b)
public static byte fromIntToByte(int i)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |