Search in sources :

Example 11 with CollectionContainer

use of com.hazelcast.collection.impl.collection.CollectionContainer in project hazelcast by hazelcast.

the class CollectionTransactionRollbackOperation method run.

@Override
public void run() throws Exception {
    CollectionContainer collectionContainer = getOrCreateContainer();
    collectionContainer.rollbackTransaction(transactionId);
}
Also used : CollectionContainer(com.hazelcast.collection.impl.collection.CollectionContainer)

Example 12 with CollectionContainer

use of com.hazelcast.collection.impl.collection.CollectionContainer in project hazelcast by hazelcast.

the class CollectionTxnAddBackupOperation method run.

@Override
public void run() throws Exception {
    CollectionContainer collectionContainer = getOrCreateContainer();
    collectionContainer.commitAddBackup(itemId, value);
    response = true;
}
Also used : CollectionContainer(com.hazelcast.collection.impl.collection.CollectionContainer)

Example 13 with CollectionContainer

use of com.hazelcast.collection.impl.collection.CollectionContainer in project hazelcast by hazelcast.

the class CollectionTxnRemoveOperation method run.

@Override
public void run() throws Exception {
    CollectionContainer collectionContainer = getOrCreateContainer();
    item = collectionContainer.commitRemove(itemId);
}
Also used : CollectionContainer(com.hazelcast.collection.impl.collection.CollectionContainer)

Example 14 with CollectionContainer

use of com.hazelcast.collection.impl.collection.CollectionContainer in project hazelcast by hazelcast.

the class CollectionCompareAndRemoveOperation method run.

@Override
public void run() throws Exception {
    CollectionContainer collectionContainer = getOrCreateContainer();
    itemIdMap = collectionContainer.compareAndRemove(retain, valueSet);
    response = !itemIdMap.isEmpty();
}
Also used : CollectionContainer(com.hazelcast.collection.impl.collection.CollectionContainer)

Example 15 with CollectionContainer

use of com.hazelcast.collection.impl.collection.CollectionContainer in project hazelcast by hazelcast.

the class CollectionGetAllOperation method run.

@Override
public void run() throws Exception {
    CollectionContainer collectionContainer = getOrCreateContainer();
    List<Data> all = collectionContainer.getAll();
    response = new SerializableList(all);
}
Also used : SerializableList(com.hazelcast.spi.impl.SerializableList) CollectionContainer(com.hazelcast.collection.impl.collection.CollectionContainer) Data(com.hazelcast.nio.serialization.Data)

Aggregations

CollectionContainer (com.hazelcast.collection.impl.collection.CollectionContainer)24 Map (java.util.Map)2 CollectionItem (com.hazelcast.collection.impl.collection.CollectionItem)1 CollectionService (com.hazelcast.collection.impl.collection.CollectionService)1 ListContainer (com.hazelcast.collection.impl.list.ListContainer)1 SetContainer (com.hazelcast.collection.impl.set.SetContainer)1 Data (com.hazelcast.nio.serialization.Data)1 SerializableList (com.hazelcast.spi.impl.SerializableList)1