Class WingsCache2k

  • All Implemented Interfaces:

    
    public class WingsCache2k
    
                        
    Since:

    2023-01-25

    Author:

    trydofor

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      public static Class<out ToggleFeature> FeatureJmx
    • Constructor Summary

      Constructors 
      Constructor Description
      WingsCache2k()
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      static Cache2kBuilder<Object, Object> builder(Class<out Object> owner, String use, int max, int ttl, int tti) construct UnknownTypes builder with max size, ttl and tti in second
      static <K, V> Cache2kBuilder<K, V> builder(Class<out Object> owner, String use, int max, int ttl, int tti, Class<K> k, Class<V> v) construct K-V type builder with max size, ttl and tti in second
      static Cache2kBuilder<Object, Object> builder(Class<out Object> owner, String use, int max, Duration ttl, Duration tti) construct UnknownTypes builder with max size, ttl and tti in second
      static <K, V> Cache2kBuilder<K, V> builder(Class<out Object> owner, String use, int max, Duration ttl, Duration tti, Class<K> k, Class<V> v) construct K-V type builder with max size, ttl and tti in second
      static <K, V> Cache2kBuilder<K, V> builder(Cache2kBuilder<K, V> bld, int max, int ttl, int tti, boolean feature) builder with max size, ttl and tti in second, and feather
      static <K, V> Cache2kBuilder<K, V> builder(Cache2kBuilder<K, V> bld, int max, Duration ttl, Duration tti, boolean feature) builder with max size, ttl and tti in second, and feather
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • WingsCache2k

        WingsCache2k()
    • Method Detail

      • builder

        @NotNull() static Cache2kBuilder<Object, Object> builder(Class<out Object> owner, String use, int max, int ttl, int tti)

        construct UnknownTypes builder with max size, ttl and tti in second

        Parameters:
        owner - owner part of name
        use - usage part of name
        max - capacity, max size
        ttl - time to live in second, skip if le 0
        tti - time to idle in second, skip if le 0
      • builder

        @NotNull() static <K, V> Cache2kBuilder<K, V> builder(Class<out Object> owner, String use, int max, int ttl, int tti, Class<K> k, Class<V> v)

        construct K-V type builder with max size, ttl and tti in second

        Parameters:
        owner - owner part of name
        use - usage part of name
        max - capacity, max size
        ttl - time to live in second, skip if le 0
        tti - time to idle in second, skip if le 0
      • builder

        @NotNull() static Cache2kBuilder<Object, Object> builder(Class<out Object> owner, String use, int max, Duration ttl, Duration tti)

        construct UnknownTypes builder with max size, ttl and tti in second

        Parameters:
        owner - owner part of name
        use - usage part of name
        max - capacity, max size
        ttl - time to live, skip if null
        tti - time to idle, skip if null
      • builder

        @NotNull() static <K, V> Cache2kBuilder<K, V> builder(Class<out Object> owner, String use, int max, Duration ttl, Duration tti, Class<K> k, Class<V> v)

        construct K-V type builder with max size, ttl and tti in second

        Parameters:
        owner - owner part of name
        use - usage part of name
        max - capacity, max size
        ttl - time to live, skip if null
        tti - time to idle, skip if null
      • builder

        @Contract(value = "_,_,_,_,_->param1") static <K, V> Cache2kBuilder<K, V> builder(Cache2kBuilder<K, V> bld, int max, int ttl, int tti, boolean feature)

        builder with max size, ttl and tti in second, and feather

        Parameters:
        bld - the builder
        max - capacity, max size
        ttl - time to live in second, skip if null
        tti - time to idle in second, skip if null
        feature - whether enable feather
      • builder

        @Contract(value = "_,_,_,_,_->param1") static <K, V> Cache2kBuilder<K, V> builder(Cache2kBuilder<K, V> bld, int max, Duration ttl, Duration tti, boolean feature)

        builder with max size, ttl and tti in second, and feather

        Parameters:
        bld - the builder
        max - capacity, max size
        ttl - time to live, skip if null
        tti - time to idle, skip if null
        feature - whether enable feather