public interface Cache<K,V>
K
to values of type V
. If supported by the
underlying implementation the mappings can further be associated with a cost, which is a
metric for the cost occurring when the given mapping is lost. Higher values represent higher
costs.void put(@NotNull K key, @NotNull V value)
key
to value
.UnsupportedOperationException
- if the underlying implementation doesn't
support values without an associated cost and put(Object, Object, byte)
should be used instead.void put(@NotNull K key, @NotNull V value, byte cost)
key
to value
with a given cost
.UnsupportedOperationException
- if the underlying implementation doesn't
support values with an associated cost and put(Object, Object)
should be used instead.Copyright © 2012–2020 The Apache Software Foundation. All rights reserved.