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

org.cache2k.AbstractCache Maven / Gradle / Ivy

package org.cache2k;

/*
 * #%L
 * cache2k API
 * %%
 * Copyright (C) 2000 - 2020 headissue GmbH, Munich
 * %%
 * 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.
 * #L%
 */

import org.cache2k.jmx.CacheInfoMXBean;
import org.cache2k.processor.EntryProcessingResult;
import org.cache2k.processor.EntryProcessor;

import java.util.Map;
import java.util.concurrent.Callable;
import java.util.concurrent.ConcurrentMap;

/**
 * Base class for implementations of the cache interface. By default every methods throws
 * {@link UnsupportedOperationException}.
 *
 * @author Jens Wilke
 */
public class AbstractCache implements Cache {

  @Override
  public String getName() {
    throw new UnsupportedOperationException();
  }

  @Override
  public V get(K key) {
    throw new UnsupportedOperationException();
  }

  @Override
  public CacheEntry getEntry(K key) {
    throw new UnsupportedOperationException();
  }

  @Override
  public void prefetch(K key) {
    throw new UnsupportedOperationException();
  }

  @Override
  public void prefetchAll(Iterable keys, CacheOperationCompletionListener listener) {
    throw new UnsupportedOperationException();
  }

  @Override
  public V peek(K key) {
    throw new UnsupportedOperationException();
  }

  @Override
  public CacheEntry peekEntry(K key) {
    throw new UnsupportedOperationException();
  }

  @Override
  public boolean containsKey(K key) {
    throw new UnsupportedOperationException();
  }

  @Override
  public void put(K key, V value) {
    throw new UnsupportedOperationException();
  }

  @Override
  public V computeIfAbsent(K key, Callable callable) {
    throw new UnsupportedOperationException();
  }

  @Override
  public boolean putIfAbsent(K key, V value) {
    throw new UnsupportedOperationException();
  }

  @Override
  public V peekAndReplace(K key, V value) {
    throw new UnsupportedOperationException();
  }

  @Override
  public boolean replace(K key, V value) {
    throw new UnsupportedOperationException();
  }

  @Override
  public boolean replaceIfEquals(K key, V oldValue, V newValue) {
    throw new UnsupportedOperationException();
  }

  @Override
  public V peekAndRemove(K key) {
    throw new UnsupportedOperationException();
  }

  @Override
  public boolean containsAndRemove(K key) {
    throw new UnsupportedOperationException();
  }

  @Override
  public void remove(K key) {
    throw new UnsupportedOperationException();
  }

  @Override
  public boolean removeIfEquals(K key, V expectedValue) {
    throw new UnsupportedOperationException();
  }

  @Override
  public void removeAll(Iterable keys) {
    throw new UnsupportedOperationException();
  }

  @Override
  public V peekAndPut(K key, V value) {
    throw new UnsupportedOperationException();
  }

  @Override
  public void expireAt(K key, long millis) {
    throw new UnsupportedOperationException();
  }

  @Override
  public void loadAll(Iterable keys, CacheOperationCompletionListener listener) {
    throw new UnsupportedOperationException();
  }

  @Override
  public void reloadAll(Iterable keys, CacheOperationCompletionListener listener) {
    throw new UnsupportedOperationException();
  }

  @Override
  public  R invoke(K key, EntryProcessor entryProcessor) {
    throw new UnsupportedOperationException();
  }

  @Override
  public  Map> invokeAll(
    Iterable keys, EntryProcessor entryProcessor) {
    throw new UnsupportedOperationException();
  }

  @Override
  public Map getAll(Iterable keys) {
    throw new UnsupportedOperationException();
  }

  @Override
  public Map peekAll(Iterable keys) {
    throw new UnsupportedOperationException();
  }

  @Override
  public void putAll(Map valueMap) {
    throw new UnsupportedOperationException();
  }

  @Override
  public Iterable keys() {
    throw new UnsupportedOperationException();
  }

  @Override
  public Iterable> entries() {
    throw new UnsupportedOperationException();
  }

  @Override
  public void removeAll() {
    throw new UnsupportedOperationException();
  }

  @Override
  public void clear() {
    throw new UnsupportedOperationException();
  }

  @Override
  public void clearAndClose() {
    throw new UnsupportedOperationException();
  }

  @Override
  public void close() {
    throw new UnsupportedOperationException();
  }

  @Override
  public CacheManager getCacheManager() {
    throw new UnsupportedOperationException();
  }

  @Override
  public boolean isClosed() {
    throw new UnsupportedOperationException();
  }

  @Override
  public  X requestInterface(Class type) {
    throw new UnsupportedOperationException();
  }

  @Override
  public ConcurrentMap asMap() {
    throw new UnsupportedOperationException();
  }

  @Override
  public CacheInfoMXBean getStatistics() {
    throw new UnsupportedOperationException();
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy