Search in sources :

Example 81 with ObjectDataInput

use of com.hazelcast.nio.ObjectDataInput in project dolphin-platform by canoo.

the class EventStreamSerializerTests method convertToEvent.

private <T extends Serializable> DolphinEvent<T> convertToEvent(final JsonElement jsonElement) throws IOException {
    final EventStreamSerializer streamSerializer = new EventStreamSerializer();
    final ObjectDataInput input = new JsonBasedObjectDataInput(jsonElement);
    return (DolphinEvent<T>) streamSerializer.read(input);
}
Also used : ObjectDataInput(com.hazelcast.nio.ObjectDataInput)

Aggregations

ObjectDataInput (com.hazelcast.nio.ObjectDataInput)81 Test (org.junit.Test)35 QuickTest (com.hazelcast.test.annotation.QuickTest)32 ParallelJVMTest (com.hazelcast.test.annotation.ParallelJVMTest)24 BufferObjectDataInput (com.hazelcast.internal.nio.BufferObjectDataInput)17 FieldKind (com.hazelcast.nio.serialization.FieldKind)16 IOException (java.io.IOException)13 ObjectDataOutput (com.hazelcast.nio.ObjectDataOutput)12 Nullable (javax.annotation.Nullable)9 GlobalSerializerConfig (com.hazelcast.config.GlobalSerializerConfig)7 SerializationConfig (com.hazelcast.config.SerializationConfig)6 StreamSerializer (com.hazelcast.nio.serialization.StreamSerializer)6 Data (com.hazelcast.nio.serialization.Data)4 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)4 Data (com.hazelcast.internal.serialization.Data)3 SerializationService (com.hazelcast.internal.serialization.SerializationService)3 DefaultSerializationServiceBuilder (com.hazelcast.internal.serialization.impl.DefaultSerializationServiceBuilder)3 HeapData (com.hazelcast.internal.serialization.impl.HeapData)3 SerializationService (com.hazelcast.spi.serialization.SerializationService)3 SerializerConfig (com.hazelcast.config.SerializerConfig)2