2 * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.groupbasedpolicy.sxp.ep.provider.impl;
11 import javax.annotation.Nonnull;
12 import javax.annotation.Nullable;
15 * Purpose: encapsulate access to DS by exposing
18 * <dd>search through cached values</dd>
20 * <dd>stores given pair (key, value) to local cache</dd>
23 * @param <K> data key type
24 * @param <V> data type
26 public interface SimpleCachedDao<K, V> extends SimpleDao<K, V> {
29 * store given pair to local cache
31 * @param key associated to value
32 * @param value associated to key
34 V update(@Nonnull K key, @Nullable V value);
37 * invalidate all cache entries
39 void invalidateCache();
42 * @return true if there is nothing cached
47 * @return unmodifiable iterator through all cached values
52 * @return unmodifiable iterator through all cached keys