001 002package org.cache2k; 003 004/* 005 * #%L 006 * cache2k api only package 007 * %% 008 * Copyright (C) 2000 - 2014 headissue GmbH, Munich 009 * %% 010 * This program is free software: you can redistribute it and/or modify 011 * it under the terms of the GNU General Public License as 012 * published by the Free Software Foundation, either version 3 of the 013 * License, or (at your option) any later version. 014 * 015 * This program is distributed in the hope that it will be useful, 016 * but WITHOUT ANY WARRANTY; without even the implied warranty of 017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 018 * GNU General Public License for more details. 019 * 020 * You should have received a copy of the GNU General Public 021 * License along with this program. If not, see 022 * <http://www.gnu.org/licenses/gpl-3.0.html>. 023 * #L% 024 */ 025 026import javax.annotation.Nonnull; 027import javax.annotation.Nullable; 028 029/** 030 * An interface to get a value by a key. 031 * 032 * @author Jens Wilke 033 */ 034public interface CacheSource<K, T> { 035 036 public @Nullable T get(@Nonnull K o) throws Throwable; 037 038}