Search in sources :

Example 66 with Data

use of com.hazelcast.nio.serialization.Data in project hazelcast by hazelcast.

the class MapKeysWithCursor method readData.

@Override
public void readData(ObjectDataInput in) throws IOException {
    nextTableIndexToReadFrom = in.readInt();
    int size = in.readInt();
    keys = new ArrayList<Data>(size);
    for (int i = 0; i < size; i++) {
        Data data = in.readData();
        keys.add(data);
    }
}
Also used : Data(com.hazelcast.nio.serialization.Data)

Example 67 with Data

use of com.hazelcast.nio.serialization.Data in project hazelcast by hazelcast.

the class BasePutOperation method publishWANReplicationEvent.

private void publishWANReplicationEvent(MapEventPublisher mapEventPublisher, Object value) {
    if (!mapContainer.isWanReplicationEnabled()) {
        return;
    }
    Record record = recordStore.getRecord(dataKey);
    if (record == null) {
        return;
    }
    final Data valueConvertedData = mapServiceContext.toData(value);
    final EntryView entryView = EntryViews.createSimpleEntryView(dataKey, valueConvertedData, record);
    mapEventPublisher.publishWanReplicationUpdate(name, entryView);
}
Also used : EntryView(com.hazelcast.core.EntryView) Record(com.hazelcast.map.impl.record.Record) Data(com.hazelcast.nio.serialization.Data)

Example 68 with Data

use of com.hazelcast.nio.serialization.Data in project hazelcast by hazelcast.

the class PutFromLoadAllOperation method writeInternal.

@Override
protected void writeInternal(ObjectDataOutput out) throws IOException {
    super.writeInternal(out);
    final List<Data> keyValueSequence = this.keyValueSequence;
    final int size = keyValueSequence.size();
    out.writeInt(size);
    for (Data data : keyValueSequence) {
        out.writeData(data);
    }
}
Also used : Data(com.hazelcast.nio.serialization.Data)

Example 69 with Data

use of com.hazelcast.nio.serialization.Data in project hazelcast by hazelcast.

the class RemoveFromLoadAllOperation method writeInternal.

@Override
protected void writeInternal(ObjectDataOutput out) throws IOException {
    super.writeInternal(out);
    final int size = keys.size();
    out.writeInt(size);
    for (Data key : keys) {
        out.writeData(key);
    }
}
Also used : Data(com.hazelcast.nio.serialization.Data)

Example 70 with Data

use of com.hazelcast.nio.serialization.Data in project hazelcast by hazelcast.

the class RemoveFromLoadAllOperation method readInternal.

@Override
protected void readInternal(ObjectDataInput in) throws IOException {
    super.readInternal(in);
    final int size = in.readInt();
    if (size > 0) {
        keys = new ArrayList<Data>(size);
    }
    for (int i = 0; i < size; i++) {
        Data data = in.readData();
        keys.add(data);
    }
}
Also used : Data(com.hazelcast.nio.serialization.Data)

Aggregations

Data (com.hazelcast.nio.serialization.Data)773 ClientMessage (com.hazelcast.client.impl.protocol.ClientMessage)140 Test (org.junit.Test)121 QuickTest (com.hazelcast.test.annotation.QuickTest)118 ParallelTest (com.hazelcast.test.annotation.ParallelTest)108 ArrayList (java.util.ArrayList)81 Map (java.util.Map)64 SerializationService (com.hazelcast.spi.serialization.SerializationService)54 HashMap (java.util.HashMap)54 NodeEngine (com.hazelcast.spi.NodeEngine)50 HashSet (java.util.HashSet)39 Address (com.hazelcast.nio.Address)28 AbstractMap (java.util.AbstractMap)28 Record (com.hazelcast.map.impl.record.Record)27 HazelcastInstance (com.hazelcast.core.HazelcastInstance)26 HeapData (com.hazelcast.internal.serialization.impl.HeapData)26 List (java.util.List)20 Future (java.util.concurrent.Future)20 CacheEventData (com.hazelcast.cache.impl.CacheEventData)19 Operation (com.hazelcast.spi.Operation)18