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

com.github.zhengframework.cache.noop.NoOpCache Maven / Gradle / Ivy

There is a newer version: 1.8.0
Show newest version
package com.github.zhengframework.cache.noop;

import java.util.Collections;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
import javax.cache.Cache;
import javax.cache.CacheManager;
import javax.cache.configuration.CacheEntryListenerConfiguration;
import javax.cache.configuration.Configuration;
import javax.cache.integration.CompletionListener;
import javax.cache.processor.EntryProcessor;
import javax.cache.processor.EntryProcessorException;
import javax.cache.processor.EntryProcessorResult;

public class NoOpCache implements Cache {

  private final CacheManager cacheManager;
  private String name;

  public NoOpCache(CacheManager cacheManager, String name) {
    this.cacheManager = cacheManager;
    this.name = name;
  }

  @Override
  public V get(K k) {
    return null;
  }

  @Override
  public Map getAll(Set set) {
    return null;
  }

  @Override
  public boolean containsKey(K k) {
    return false;
  }

  @Override
  public void loadAll(Set set, boolean b, CompletionListener completionListener) {

  }

  @Override
  public void put(K k, V v) {

  }

  @Override
  public V getAndPut(K k, V v) {
    return null;
  }

  @Override
  public void putAll(Map map) {

  }

  @Override
  public boolean putIfAbsent(K k, V v) {
    return false;
  }

  @Override
  public boolean remove(K k) {
    return false;
  }

  @Override
  public boolean remove(K k, V v) {
    return false;
  }

  @Override
  public V getAndRemove(K k) {
    return null;
  }

  @Override
  public boolean replace(K k, V v, V v1) {
    return false;
  }

  @Override
  public boolean replace(K k, V v) {
    return false;
  }

  @Override
  public V getAndReplace(K k, V v) {
    return null;
  }

  @Override
  public void removeAll(Set set) {

  }

  @Override
  public void removeAll() {

  }

  @Override
  public void clear() {

  }

  @Override
  public > C getConfiguration(Class aClass) {
    return null;
  }

  @Override
  public  T invoke(K k, EntryProcessor entryProcessor, Object... objects)
      throws EntryProcessorException {
    return null;
  }

  @Override
  public  Map> invokeAll(Set set,
      EntryProcessor entryProcessor, Object... objects) {
    return null;
  }

  @Override
  public String getName() {
    return name;
  }

  @Override
  public CacheManager getCacheManager() {
    return cacheManager;
  }

  @Override
  public void close() {

  }

  @Override
  public boolean isClosed() {
    return false;
  }

  @Override
  public  T unwrap(Class aClass) {
    return null;
  }

  @Override
  public void registerCacheEntryListener(
      CacheEntryListenerConfiguration cacheEntryListenerConfiguration) {

  }

  @Override
  public void deregisterCacheEntryListener(
      CacheEntryListenerConfiguration cacheEntryListenerConfiguration) {

  }

  public Iterator> iterator() {
    return Collections.emptyIterator();
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy