Package com.hazelcast.multimap.impl

Examples of com.hazelcast.multimap.impl.MultiMapRecord


        Collection<MultiMapRecord> coll = wrapper.getCollection(false);
        removed = new LinkedList<MultiMapRecord>();
        for (Long recordId : recordIds) {
            Iterator<MultiMapRecord> iter = coll.iterator();
            while (iter.hasNext()) {
                MultiMapRecord record = iter.next();
                if (record.getRecordId() == recordId) {
                    iter.remove();
                    removed.add(record);
                    break;
                }
            }
View Full Code Here


        this.index = index;
    }

    public void run() throws Exception {

        MultiMapRecord record = new MultiMapRecord(recordId, isBinary() ? value : toObject(value));
        Collection<MultiMapRecord> coll = getOrCreateCollectionWrapper().getCollection(false);
        if (index == -1) {
            response = coll.add(record);
        } else {
            try {
View Full Code Here

        if (wrapper.containsRecordId(recordId)) {
            response = false;
            return;
        }
        Collection<MultiMapRecord> coll = wrapper.getCollection(false);
        MultiMapRecord record = new MultiMapRecord(recordId, isBinary() ? value : toObject(value));
        coll.add(record);
    }
View Full Code Here

    }

    public void run() throws Exception {
        MultiMapContainer container = getOrCreateContainer();
        recordId = container.nextId();
        MultiMapRecord record = new MultiMapRecord(recordId, isBinary() ? value : toObject(value));
        Collection<MultiMapRecord> coll = container.getOrCreateMultiMapWrapper(dataKey).getCollection(false);
        if (index == -1) {
            response = coll.add(record);
        } else {
            try {
View Full Code Here

        }
        Collection<MultiMapRecord> coll = wrapper.getCollection(false);
        for (Long recordId : recordIds) {
            Iterator<MultiMapRecord> iter = coll.iterator();
            while (iter.hasNext()) {
                MultiMapRecord record = iter.next();
                if (record.getRecordId() == recordId) {
                    iter.remove();
                    break;
                }
            }
        }
View Full Code Here

        if (wrapper.containsRecordId(recordId)) {
            response = false;
            return;
        }
        Collection<MultiMapRecord> coll = wrapper.getCollection(false);
        MultiMapRecord record = new MultiMapRecord(recordId, isBinary() ? value : toObject(value));
        coll.add(record);
    }
View Full Code Here

        if (collection == null) {
            return emptyCollection(collectionType);
        }
        final Collection newCollection = createCollection(collectionType, collection.size());
        for (Object obj : collection) {
            MultiMapRecord record = nodeEngine.toObject(obj);
            newCollection.add(nodeEngine.toObject(record.getObject()));
        }
        return newCollection;
    }
View Full Code Here

            return emptyCollection(collectionType);
        }
        final Collection<MultiMapRecord> newCollection
                = createCollection(collectionType, collection.size());
        for (Object obj : collection) {
            MultiMapRecord record = nodeEngine.toObject(obj);
            newCollection.add(record);
        }
        return newCollection;
    }
View Full Code Here

                    coll = new HashSet<MultiMapRecord>();
                } else {
                    coll = new LinkedList<MultiMapRecord>();
                }
                for (int k = 0; k < collSize; k++) {
                    MultiMapRecord record = new MultiMapRecord();
                    record.readData(in);
                    coll.add(record);
                }
                collections.put(key, new MultiMapWrapper(coll));

            }
View Full Code Here

        MultiMapWrapper wrapper = getCollectionWrapper();
        if (wrapper == null) {
            return;
        }
        Collection<MultiMapRecord> coll = wrapper.getCollection(false);
        MultiMapRecord record = new MultiMapRecord(isBinary() ? value : toObject(value));
        Iterator<MultiMapRecord> iter = coll.iterator();
        while (iter.hasNext()) {
            MultiMapRecord r = iter.next();
            if (r.equals(record)) {
                iter.remove();
                recordId = r.getRecordId();
                response = true;
                if (coll.isEmpty()) {
                    delete();
                }
                break;
View Full Code Here

TOP

Related Classes of com.hazelcast.multimap.impl.MultiMapRecord

Copyright © 2018 www.massapicom. 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.