Search in sources :

Example 6 with ListContainer

use of com.hazelcast.collection.impl.list.ListContainer in project hazelcast by hazelcast.

the class ListIndexOfOperation method run.

@Override
public void run() throws Exception {
    ListContainer listContainer = getOrCreateListContainer();
    response = listContainer.indexOf(last, value);
}
Also used : ListContainer(com.hazelcast.collection.impl.list.ListContainer)

Example 7 with ListContainer

use of com.hazelcast.collection.impl.list.ListContainer in project hazelcast by hazelcast.

the class ListRemoveOperation method run.

@Override
public void run() throws Exception {
    ListContainer listContainer = getOrCreateListContainer();
    final CollectionItem item = listContainer.remove(index);
    itemId = item.getItemId();
    response = item.getValue();
}
Also used : ListContainer(com.hazelcast.collection.impl.list.ListContainer) CollectionItem(com.hazelcast.collection.impl.collection.CollectionItem)

Example 8 with ListContainer

use of com.hazelcast.collection.impl.list.ListContainer in project hazelcast by hazelcast.

the class ListSetBackupOperation method run.

@Override
public void run() throws Exception {
    ListContainer listContainer = getOrCreateListContainer();
    listContainer.setBackup(oldItemId, itemId, value);
}
Also used : ListContainer(com.hazelcast.collection.impl.list.ListContainer)

Example 9 with ListContainer

use of com.hazelcast.collection.impl.list.ListContainer in project hazelcast by hazelcast.

the class ListSetOperation method run.

@Override
public void run() throws Exception {
    ListContainer listContainer = getOrCreateListContainer();
    itemId = listContainer.nextId();
    CollectionItem item = listContainer.set(index, itemId, value);
    oldItemId = item.getItemId();
    response = item.getValue();
}
Also used : ListContainer(com.hazelcast.collection.impl.list.ListContainer) CollectionItem(com.hazelcast.collection.impl.collection.CollectionItem)

Example 10 with ListContainer

use of com.hazelcast.collection.impl.list.ListContainer in project hazelcast by hazelcast.

the class ListSubOperation method run.

@Override
public void run() throws Exception {
    ListContainer listContainer = getOrCreateListContainer();
    List<Data> sub = listContainer.sub(from, to);
    response = new SerializableList(sub);
}
Also used : SerializableList(com.hazelcast.spi.impl.SerializableList) ListContainer(com.hazelcast.collection.impl.list.ListContainer) Data(com.hazelcast.nio.serialization.Data)

Aggregations

ListContainer (com.hazelcast.collection.impl.list.ListContainer)11 CollectionItem (com.hazelcast.collection.impl.collection.CollectionItem)5 Data (com.hazelcast.nio.serialization.Data)2 CollectionContainer (com.hazelcast.collection.impl.collection.CollectionContainer)1 CollectionAddAllBackupOperation (com.hazelcast.collection.impl.collection.operations.CollectionAddAllBackupOperation)1 CollectionAddAllOperation (com.hazelcast.collection.impl.collection.operations.CollectionAddAllOperation)1 CollectionAddBackupOperation (com.hazelcast.collection.impl.collection.operations.CollectionAddBackupOperation)1 CollectionAddOperation (com.hazelcast.collection.impl.collection.operations.CollectionAddOperation)1 CollectionClearBackupOperation (com.hazelcast.collection.impl.collection.operations.CollectionClearBackupOperation)1 CollectionClearOperation (com.hazelcast.collection.impl.collection.operations.CollectionClearOperation)1 CollectionCompareAndRemoveOperation (com.hazelcast.collection.impl.collection.operations.CollectionCompareAndRemoveOperation)1 CollectionContainsOperation (com.hazelcast.collection.impl.collection.operations.CollectionContainsOperation)1 CollectionGetAllOperation (com.hazelcast.collection.impl.collection.operations.CollectionGetAllOperation)1 CollectionIsEmptyOperation (com.hazelcast.collection.impl.collection.operations.CollectionIsEmptyOperation)1 CollectionRemoveBackupOperation (com.hazelcast.collection.impl.collection.operations.CollectionRemoveBackupOperation)1 CollectionRemoveOperation (com.hazelcast.collection.impl.collection.operations.CollectionRemoveOperation)1 CollectionSizeOperation (com.hazelcast.collection.impl.collection.operations.CollectionSizeOperation)1 ListService (com.hazelcast.collection.impl.list.ListService)1 ListAddAllOperation (com.hazelcast.collection.impl.list.operations.ListAddAllOperation)1 ListAddOperation (com.hazelcast.collection.impl.list.operations.ListAddOperation)1