org.infinispan.InternalCacheSet Maven / Gradle / Ivy
package org.infinispan;
import java.util.Collection;
import java.util.function.Consumer;
import java.util.function.Predicate;
import org.infinispan.commons.util.CloseableIterator;
import org.infinispan.commons.util.CloseableSpliterator;
import org.infinispan.commons.util.IntSet;
import org.reactivestreams.Publisher;
/**
* Base class for internal classes used in cache collections.
*
* It extends {@link CacheSet} because that's what interceptors used return for
* {@link org.infinispan.commands.read.KeySetCommand} and {@link org.infinispan.commands.read.EntrySetCommand},
* but because these classes are only used internally, we can avoid implementing most of the methods.
*
* Subclasses only need to implement {@link #localPublisher(IntSet)} and {@link #localPublisher(int)},
* and a facade class like {@link org.infinispan.cache.impl.CacheBackedKeySet} implements the rest of the
* {@link CacheSet} methods.
*
* @param The element type
* @since 14.0
* @author Dan Berindei
*/
public abstract class InternalCacheSet implements CacheSet {
@Override
public abstract Publisher localPublisher(int segment);
@Override
public abstract Publisher localPublisher(IntSet segments);
@Override
public final boolean removeIf(Predicate super E> filter) {
throw new UnsupportedOperationException();
}
@Override
public final void forEach(Consumer super E> action) {
throw new UnsupportedOperationException();
}
@Override
public final CloseableIterator iterator() {
throw new UnsupportedOperationException();
}
@Override
public final CloseableSpliterator spliterator() {
throw new UnsupportedOperationException();
}
@Override
public final CacheStream stream() {
throw new UnsupportedOperationException();
}
@Override
public final CacheStream parallelStream() {
throw new UnsupportedOperationException();
}
@Override
public final int size() {
throw new UnsupportedOperationException();
}
@Override
public final boolean isEmpty() {
throw new UnsupportedOperationException();
}
@Override
public final boolean contains(Object o) {
throw new UnsupportedOperationException();
}
@Override
public final Object[] toArray() {
throw new UnsupportedOperationException();
}
@Override
public final T[] toArray(T[] a) {
throw new UnsupportedOperationException();
}
@Override
public final boolean add(E e) {
throw new UnsupportedOperationException();
}
@Override
public final boolean remove(Object o) {
throw new UnsupportedOperationException();
}
@Override
public final boolean containsAll(Collection> c) {
throw new UnsupportedOperationException();
}
@Override
public final boolean addAll(Collection extends E> c) {
throw new UnsupportedOperationException();
}
@Override
public final boolean removeAll(Collection> c) {
throw new UnsupportedOperationException();
}
@Override
public final boolean retainAll(Collection> c) {
throw new UnsupportedOperationException();
}
@Override
public final void clear() {
throw new UnsupportedOperationException();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy