net.sf.hajdbc.util.concurrent.Registry Maven / Gradle / Ivy
/*
* HA-JDBC: High-Availability JDBC
* Copyright (C) 2012 Paul Ferraro
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see .
*/
package net.sf.hajdbc.util.concurrent;
import net.sf.hajdbc.util.TimePeriod;
/**
* @author Paul Ferraro
* @param
* @param
* @param
* @param
*/
public interface Registry
{
V get(K key, C context) throws E;
V get(K key) throws E;
void remove(K key) throws E;
public interface Factory
{
V create(K key, C context) throws E;
TimePeriod getTimeout();
}
public interface Store
{
V setIfAbsent(K key, V value);
V get(K key);
V clear(K key);
}
}