Package org.apache.commons.collections4.map

# Interface PassiveExpiringMap.ExpirationPolicy<K,V>

Type Parameters:
  `K` - The key object type.
  `V` - The value object type

All Superinterfaces:
  `Serializable`

All Known Implementing Classes:
  `PassiveExpiringMap.ConstantTimeToLiveExpirationPolicy`

Enclosing class:
  `PassiveExpiringMap<K,V>`

Functional Interface:
  This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface PassiveExpiringMap.ExpirationPolicy<K,V> extends Serializable
A policy to determine the expiration time for key-value entries.

Since:
  4.0

- ## Method Summary

  Modifier and Type
  Method
  Description
  `long`
  `expirationTime(K key, V value)`
  Determine the expiration time for the given key-value entry.

- ## Method Details

  - ### expirationTime

    long expirationTime(K key, V value)
    Determine the expiration time for the given key-value entry.
    Parameters:
      `key` - The key for the entry.
      `value` - The value for the entry.
    Returns:
      The expiration time value measured in milliseconds. A negative return value indicates the entry never expires.