org.apache.ignite.cache.eviction.fifo

## Class FifoEvictionPolicyFactory<K,V>

- java.lang.Object
- - org.apache.ignite.cache.eviction.AbstractEvictionPolicyFactory<FifoEvictionPolicy<K,V>>
  - - org.apache.ignite.cache.eviction.fifo.FifoEvictionPolicyFactory<K,V>

- All Implemented Interfaces:
    Serializable, javax.cache.configuration.Factory<FifoEvictionPolicy<K,V>>

      public class FifoEvictionPolicyFactory<K,V>
      extends AbstractEvictionPolicyFactory<FifoEvictionPolicy<K,V>>

  Factory class for `FifoEvictionPolicy`. Creates cache Eviction policy based on `First In First Out (FIFO)` algorithm and supports batch eviction.

  The eviction starts in the following cases:

  - The cache size becomes `batchSize` elements greater than the maximum size.
  - The size of cache entries in bytes becomes greater than the maximum memory size. The size of cache entry calculates as sum of key size and value size.
  Note:Batch eviction is enabled only if maximum memory limit isn't set (`maxMemSize == 0`). `batchSize` elements will be evicted in this case. The default `batchSize` value is `1`.

  `FifoEvictionPolicy` implementation is very efficient since it does not create any additional table-like data structures. The `FIFO` ordering information is maintained by attaching ordering metadata to cache entries.

  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FifoEvictionPolicyFactory()` Constructor.
    `FifoEvictionPolicyFactory(int maxSize)` Constructor.
    `FifoEvictionPolicyFactory(int maxSize, int batchSize, long maxMemSize)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `FifoEvictionPolicy<K,V>` | `create()`

    - ### Methods inherited from class org.apache.ignite.cache.eviction.AbstractEvictionPolicyFactory

      `getBatchSize, getMaxMemorySize, getMaxSize, setBatchSize, setMaxMemorySize, setMaxSize`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### FifoEvictionPolicyFactory

          public FifoEvictionPolicyFactory()

      Constructor.

    - #### FifoEvictionPolicyFactory

          public FifoEvictionPolicyFactory(int maxSize)

      Constructor.

    - #### FifoEvictionPolicyFactory

          public FifoEvictionPolicyFactory(int maxSize,
                                           int batchSize,
                                           long maxMemSize)

  - ### Method Detail

    - #### create

          public FifoEvictionPolicy<K,V> create()

2020 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.9.0
Release Date | : October 15 2020