/* * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ package org.opendaylight.groupbasedpolicy.sxp.ep.provider.impl; import javax.annotation.Nonnull; import javax.annotation.Nullable; /** * Purpose: encapsulate access to DS by exposing *
*
find
*
search through cached values
*
update
*
stores given pair (key, value) to local cache
*
* * @param data key type * @param data type */ public interface SimpleCachedDao extends SimpleDao { /** * store given pair to local cache * * @param key associated to value * @param value associated to key */ V update(@Nonnull K key, @Nullable V value); /** * invalidate all cache entries */ void invalidateCache(); /** * @return true if there is nothing cached */ boolean isEmpty(); /** * @return unmodifiable iterator through all cached values */ Iterable values(); }