Package com.hazelcast.nio.serialization

Examples of com.hazelcast.nio.serialization.Data.readData()


        int size = in.readInt();
        dataMap = new HashMap<Long, Data>(size);
        for (int i = 0; i < size; i++) {
            long itemId = in.readLong();
            Data value = new Data();
            value.readData(in);
            dataMap.put(itemId, value);
        }
    }

    @Override
View Full Code Here


        if (binary) {
            byte[] dataBuffer = (byte[]) val;
            ObjectDataInput in = serializationService.createObjectDataInput(dataBuffer);
            Data data = new Data();
            try {
                data.readData(in);
            } catch (IOException e) {
                throw new HazelcastException(e);
            }
            return data;
        }
View Full Code Here

                for (Map.Entry<Long, ?> entry : map.entrySet()) {
                    byte[] dataBuffer = (byte[]) entry.getValue();
                    ObjectDataInput in = serializationService.createObjectDataInput(dataBuffer);
                    Data data = new Data();
                    try {
                        data.readData(in);
                    } catch (IOException e) {
                        throw new HazelcastException(e);
                    }
                    dataMap.put(entry.getKey(), data);
                }
View Full Code Here

        final ObjectDataInput in = reader.getRawDataInput();
        final int size = in.readInt();
        valueList = new ArrayList<Data>(size);
        for (int i = 0; i < size; i++) {
            final Data value = new Data();
            value.readData(in);
            valueList.add(value);
        }
    }

    @Override
View Full Code Here

        final ObjectDataInput in = reader.getRawDataInput();
        final int size = in.readInt();
        valueSet = new HashSet<Data>(size);
        for (int i = 0; i < size; i++) {
            final Data value = new Data();
            value.readData(in);
            valueSet.add(value);
        }
    }

    @Override
View Full Code Here

        final ObjectDataInput in = reader.getRawDataInput();
        final int size = in.readInt();
        valueSet = new HashSet<Data>(size);
        for (int i = 0; i < size; i++) {
            final Data value = new Data();
            value.readData(in);
            valueSet.add(value);
        }
    }

    @Override
View Full Code Here

            collection = new HashSet<Data>(size);
        }
        final ObjectDataInput in = reader.getRawDataInput();
        for (int i = 0; i < size; i++) {
            Data data = new Data();
            data.readData(in);
            collection.add(data);
        }
    }
}
View Full Code Here

        } else {
            keys = new ArrayList<Data>(size);
            ObjectDataInput input = reader.getRawDataInput();
            for (int i = 0; i < size; i++) {
                Data key = new Data();
                key.readData(input);
                keys.add(key);
            }
        }

    }
View Full Code Here

    public void readData(ObjectDataInput in) throws IOException {
        int size = in.readInt();
        values = new ArrayList<Data>(size);
        for (int i = 0; i < size; i++) {
            Data data = new Data();
            data.readData(in);
            values.add(data);
        }
    }

    @Override
View Full Code Here

        if (size > 0) {
            keys = new ArrayList<Data>(size);
        }
        for (int i = 0; i < size; i++) {
            Data data = new Data();
            data.readData(in);
            keys.add(data);
        }
        replaceExistingValues = in.readBoolean();
    }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.