Package com.hazelcast.multimap

Examples of com.hazelcast.multimap.MultiMapContainer


        super(name);
    }

    public void beforeRun() throws Exception {
        if (hasListener()) {
            MultiMapContainer container = getOrCreateContainer();
            objects = container.copyCollections();
        }
    }
View Full Code Here


            objects = container.copyCollections();
        }
    }

    public void run() throws Exception {
        MultiMapContainer container = getOrCreateContainer();
        container.clear();
        response = true;
    }
View Full Code Here

    public void afterRun() throws Exception {
        ((MultiMapService) getService()).getLocalMultiMapStatsImpl(name).incrementOtherOperations();

        if (objects != null && !objects.isEmpty()) {
            MultiMapContainer container = getOrCreateContainer();
            for (Map.Entry<Data, Collection<MultiMapRecord>> entry : objects.entrySet()) {
                Data key = entry.getKey();
                if (container.isLocked(key)) {
                    continue;//key is locked so not removed
                }
                Collection<MultiMapRecord> coll = entry.getValue();
                for (MultiMapRecord record : coll) {
                    publishEvent(EntryEventType.REMOVED, key, record.getObject());
View Full Code Here

        this.key = key;
        this.value = value;
    }

    public void run() throws Exception {
        MultiMapContainer container = getOrCreateContainer();
        ((MultiMapService) getService()).getLocalMultiMapStatsImpl(name).incrementOtherOperations();
        if (key != null && value != null) {
            response = container.containsEntry(isBinary(), key, value);
        } else if (key != null) {
            response = container.containsKey(key);
        } else {
            response = container.containsValue(isBinary(), value);
        }
    }
View Full Code Here

    public ValuesOperation(String name) {
        super(name);
    }

    public void run() throws Exception {
        MultiMapContainer container = getOrCreateContainer();
        ((MultiMapService) getService()).getLocalMultiMapStatsImpl(name).incrementOtherOperations();
        response = new MultiMapResponse(container.values());
    }
View Full Code Here

    public SizeOperation(String name) {
        super(name);
    }

    public void run() throws Exception {
        MultiMapContainer container = getOrCreateContainer();
        response = container.size();
        ((MultiMapService) getService()).getLocalMultiMapStatsImpl(name).incrementOtherOperations();
    }
View Full Code Here

    public EntrySetOperation(String name) {
        super(name);
    }

    public void run() throws Exception {
        MultiMapContainer container = getOrCreateContainer();
        ((MultiMapService) getService()).getLocalMultiMapStatsImpl(name).incrementOtherOperations();
        response = new EntrySetResponse(container.copyCollections(), getNodeEngine());
    }
View Full Code Here

        this.value = value;
        this.index = index;
    }

    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 {
                ((List<MultiMapRecord>) coll).add(index, record);
View Full Code Here

    public KeySetOperation(String name) {
        super(name);
    }

    public void run() throws Exception {
        MultiMapContainer container = getOrCreateContainer();
        ((MultiMapService) getService()).getLocalMultiMapStatsImpl(name).incrementOtherOperations();
        response = new MultiMapResponse(container.keySet());
    }
View Full Code Here

    public ClearBackupOperation(String name) {
        super(name);
    }

    public void run() throws Exception {
        MultiMapContainer container = getOrCreateContainer();
        container.clear();
        response = true;
    }
View Full Code Here

TOP

Related Classes of com.hazelcast.multimap.MultiMapContainer

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.