Search in sources :

Example 16 with MultiMapContainer

use of com.hazelcast.multimap.impl.MultiMapContainer in project hazelcast by hazelcast.

the class ClearBackupOperation method run.

@Override
public void run() throws Exception {
    MultiMapContainer container = getOrCreateContainer();
    container.clear();
    response = true;
}
Also used : MultiMapContainer(com.hazelcast.multimap.impl.MultiMapContainer)

Example 17 with MultiMapContainer

use of com.hazelcast.multimap.impl.MultiMapContainer in project hazelcast by hazelcast.

the class ClearOperation method run.

@Override
public void run() throws Exception {
    MultiMapContainer container = getOrCreateContainer();
    response = container.clear();
}
Also used : MultiMapContainer(com.hazelcast.multimap.impl.MultiMapContainer)

Example 18 with MultiMapContainer

use of com.hazelcast.multimap.impl.MultiMapContainer in project hazelcast by hazelcast.

the class ContainsEntryOperation method run.

@Override
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);
    }
}
Also used : MultiMapContainer(com.hazelcast.multimap.impl.MultiMapContainer)

Example 19 with MultiMapContainer

use of com.hazelcast.multimap.impl.MultiMapContainer in project hazelcast by hazelcast.

the class CountOperation method run.

@Override
public void run() throws Exception {
    MultiMapContainer container = getOrCreateContainer();
    ((MultiMapService) getService()).getLocalMultiMapStatsImpl(name).incrementOtherOperations();
    MultiMapValue multiMapValue = container.getMultiMapValueOrNull(dataKey);
    response = multiMapValue == null ? 0 : multiMapValue.getCollection(false).size();
}
Also used : MultiMapValue(com.hazelcast.multimap.impl.MultiMapValue) MultiMapContainer(com.hazelcast.multimap.impl.MultiMapContainer)

Example 20 with MultiMapContainer

use of com.hazelcast.multimap.impl.MultiMapContainer in project hazelcast by hazelcast.

the class EntrySetOperation method run.

@Override
public void run() throws Exception {
    MultiMapContainer container = getOrCreateContainer();
    ((MultiMapService) getService()).getLocalMultiMapStatsImpl(name).incrementOtherOperations();
    response = new EntrySetResponse(container.copyCollections(), getNodeEngine());
}
Also used : MultiMapContainer(com.hazelcast.multimap.impl.MultiMapContainer)

Aggregations

MultiMapContainer (com.hazelcast.multimap.impl.MultiMapContainer)21 MultiMapValue (com.hazelcast.multimap.impl.MultiMapValue)9 MultiMapRecord (com.hazelcast.multimap.impl.MultiMapRecord)8 TransactionException (com.hazelcast.transaction.TransactionException)2 MultiMapConfig (com.hazelcast.config.MultiMapConfig)1 MultiMapResponse (com.hazelcast.multimap.impl.operations.MultiMapResponse)1 Collection (java.util.Collection)1 List (java.util.List)1