Package com.wavefront.agent.queueing
Interface TaskConverter<T>
-
- Type Parameters:
T- type of objects stored.
- All Known Implementing Classes:
RetryTaskConverter
public interface TaskConverter<T>Proxy-specific interface for converting data into and from queues, this potentially allows us to support other converting mechanisms in the future.- Author:
- [email protected]
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classTaskConverter.CompressionTypeSupported compression schemas
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TfromBytes(byte[] bytes)De-serializes an object from a byte array.IntegergetWeight(byte[] bytes)Attempts to retrieve task weight from abyte[], without de-serializing the object, if at all possible.voidserializeToStream(T value, OutputStream bytes)Serializesvalueto bytes written to the specified stream.
-
-
-
Method Detail
-
fromBytes
T fromBytes(@Nonnull byte[] bytes) throws IOException
De-serializes an object from a byte array.- Returns:
- de-serialized object.
- Throws:
IOException
-
serializeToStream
void serializeToStream(@Nonnull T value, @Nonnull OutputStream bytes) throws IOException
Serializesvalueto bytes written to the specified stream.- Parameters:
value- value to serialize.bytes- output stream to write abyte[]to.- Throws:
IOException
-
-