All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.infinispan.InternalCacheSet Maven / Gradle / Ivy

There is a newer version: 15.1.0.Dev04
Show newest version
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 filter) { throw new UnsupportedOperationException(); } @Override public final void forEach(Consumer 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 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