Package org.jivesoftware.util.cache
Interface ExternalizableUtilStrategy
-
- All Known Implementing Classes:
DummyExternalizableUtil
public interface ExternalizableUtilStrategy
Interface that allows to provide different ways for implementing serialization of objects. The open source version of the server will just provide a dummy implementation that does nothing. The enterprise version will use Coherence as its underlying mechanism.- Author:
- Gaston Dombiak
-
-
Method Summary
-
-
-
Method Detail
-
writeStringMap
void writeStringMap(DataOutput out, Map<String,String> stringMap) throws IOException
Writes a Map of String key and value pairs. This method handles the case when the Map isnull
.- Parameters:
out
- the output stream.stringMap
- the Map of String key/value pairs.- Throws:
IOException
- if an error occurs.
-
readStringMap
Map<String,String> readStringMap(DataInput in) throws IOException
Reads a Map of String key and value pairs. This method will returnnull
if the Map written to the stream wasnull
.- Parameters:
in
- the input stream.- Returns:
- a Map of String key/value pairs.
- Throws:
IOException
- if an error occurs.
-
writeLongIntMap
void writeLongIntMap(DataOutput out, Map<Long,Integer> map) throws IOException
Writes a Map of Long key and Integer value pairs. This method handles the case when the Map isnull
.- Parameters:
out
- the output stream.map
- the Map of Long key/Integer value pairs.- Throws:
IOException
- if an error occurs.
-
readLongIntMap
Map<Long,Integer> readLongIntMap(DataInput in) throws IOException
Reads a Map of Long key and Integer value pairs. This method will returnnull
if the Map written to the stream wasnull
.- Parameters:
in
- the input stream.- Returns:
- a Map of Long key/Integer value pairs.
- Throws:
IOException
- if an error occurs.
-
writeStringList
void writeStringList(DataOutput out, List<String> stringList) throws IOException
Writes a List of Strings. This method handles the case when the List isnull
.- Parameters:
out
- the output stream.stringList
- the List of Strings.- Throws:
IOException
- if an error occurs.
-
readStringList
List<String> readStringList(DataInput in) throws IOException
Reads a List of Strings. This method will returnnull
if the List written to the stream wasnull
.- Parameters:
in
- the input stream.- Returns:
- a List of Strings.
- Throws:
IOException
- if an error occurs.
-
writeLongArray
void writeLongArray(DataOutput out, long[] array) throws IOException
Writes an array of long values. This method handles the case when the array isnull
.- Parameters:
out
- the output stream.array
- the array of long values.- Throws:
IOException
- if an error occurs.
-
readLongArray
long[] readLongArray(DataInput in) throws IOException
Reads an array of long values. This method will returnnull
if the array written to the stream wasnull
.- Parameters:
in
- the input stream.- Returns:
- an array of long values.
- Throws:
IOException
- if an error occurs.
-
writeLong
void writeLong(DataOutput out, long value) throws IOException
- Throws:
IOException
-
readLong
long readLong(DataInput in) throws IOException
- Throws:
IOException
-
writeBoolean
void writeBoolean(DataOutput out, boolean value) throws IOException
- Throws:
IOException
-
readBoolean
boolean readBoolean(DataInput in) throws IOException
- Throws:
IOException
-
writeByteArray
void writeByteArray(DataOutput out, byte[] value) throws IOException
- Throws:
IOException
-
readByteArray
byte[] readByteArray(DataInput in) throws IOException
- Throws:
IOException
-
writeSerializable
void writeSerializable(DataOutput out, Serializable value) throws IOException
- Throws:
IOException
-
readSerializable
Serializable readSerializable(DataInput in) throws IOException
- Throws:
IOException
-
writeSafeUTF
void writeSafeUTF(DataOutput out, String value) throws IOException
- Throws:
IOException
-
readSafeUTF
String readSafeUTF(DataInput in) throws IOException
- Throws:
IOException
-
writeExternalizableCollection
void writeExternalizableCollection(DataOutput out, Collection<? extends Externalizable> value) throws IOException
- Throws:
IOException
-
readExternalizableCollection
int readExternalizableCollection(DataInput in, Collection<? extends Externalizable> value, ClassLoader loader) throws IOException
- Throws:
IOException
-
writeSerializableCollection
void writeSerializableCollection(DataOutput out, Collection<? extends Serializable> value) throws IOException
- Throws:
IOException
-
readSerializableCollection
int readSerializableCollection(DataInput in, Collection<? extends Serializable> value, ClassLoader loader) throws IOException
- Throws:
IOException
-
writeExternalizableMap
void writeExternalizableMap(DataOutput out, Map<String,? extends Externalizable> map) throws IOException
- Throws:
IOException
-
readExternalizableMap
int readExternalizableMap(DataInput in, Map<String,? extends Externalizable> map, ClassLoader loader) throws IOException
- Throws:
IOException
-
writeSerializableMap
void writeSerializableMap(DataOutput out, Map<? extends Serializable,? extends Serializable> map) throws IOException
- Throws:
IOException
-
readSerializableMap
int readSerializableMap(DataInput in, Map<? extends Serializable,? extends Serializable> map, ClassLoader loader) throws IOException
- Throws:
IOException
-
writeStringsMap
void writeStringsMap(DataOutput out, Map<String,Set<String>> map) throws IOException
- Throws:
IOException
-
readStringsMap
int readStringsMap(DataInput in, Map<String,Set<String>> map) throws IOException
- Throws:
IOException
-
writeStrings
void writeStrings(DataOutput out, Collection<String> collection) throws IOException
- Throws:
IOException
-
readStrings
int readStrings(DataInput in, Collection<String> collection) throws IOException
- Throws:
IOException
-
writeInt
void writeInt(DataOutput out, int value) throws IOException
- Throws:
IOException
-
readInt
int readInt(DataInput in) throws IOException
- Throws:
IOException
-
-