org.redisson.api.RListReactive Maven / Gradle / Ivy
/**
* Copyright 2018 Nikita Koksharov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.redisson.api;
import java.util.Collection;
import java.util.List;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
/**
* list functions
*
* @author Nikita Koksharov
*
* @param the type of elements held in this collection
*/
// TODO add sublist support
public interface RListReactive extends RCollectionReactive, RSortableReactive> {
/**
* Loads elements by specified indexes
*
* @param indexes of elements
* @return elements
*/
Mono> get(int ...indexes);
/**
* Add element
after elementToFind
*
* @param elementToFind - object to find
* @param element - object to add
* @return new list size
*/
Mono addAfter(V elementToFind, V element);
/**
* Add element
before elementToFind
*
* @param elementToFind - object to find
* @param element - object to add
* @return new list size
*/
Mono addBefore(V elementToFind, V element);
Flux descendingIterator();
Flux descendingIterator(int startIndex);
Flux iterator(int startIndex);
Mono lastIndexOf(Object o);
Mono indexOf(Object o);
Mono add(int index, V element);
Mono addAll(int index, Collection extends V> coll);
Mono fastSet(int index, V element);
Mono set(int index, V element);
Mono get(int index);
Mono remove(int index);
/**
* Read all elements at once
*
* @return list of values
*/
Mono> readAll();
/**
* Trim list and remains elements only in specified range
* fromIndex
, inclusive, and toIndex
, inclusive.
*
* @param fromIndex - from index
* @param toIndex - to index
* @return void
*/
Mono trim(int fromIndex, int toIndex);
/**
* Remove object by specified index
*
* @param index - index of object
* @return void
*/
Mono fastRemove(int index);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy