State

object State
Companion:
class
class Object
trait Matchable
class Any
State.type

Type members

Classlikes

sealed trait Conflict[S1 <: State, S2 <: State]

Represents conflicts that can exists between different options of the com.stuart.zcaffeine.ZCaffeine cache builder.

Represents conflicts that can exists between different options of the com.stuart.zcaffeine.ZCaffeine cache builder.

Used in combination with State to restrict incompatible configurations of the underlying com.github.benmanes.caffeine.cache.Caffeine builder, like configuring both max size and max weight.

Note: using ZCaffeine.fromCaffeineSpec breaks those checks, as we don’t know for sure what has been already configured.

sealed trait EnableScheduling extends State

Scheduling has been enabled

Scheduling has been enabled

sealed trait EvictionListener extends State

An eviction listener has been configured.

An eviction listener has been configured.

sealed trait ExpireAfter extends State

Expiry has been configured.

Expiry has been configured.

sealed trait ExpireAfterAccess extends State

Expiry after access has been configured.

Expiry after access has been configured.

sealed trait ExpireAfterWrite extends State

Expiry after write has been configured.

Expiry after write has been configured.

sealed trait InitCapacity extends State

An initial capacity has been set.

An initial capacity has been set.

sealed trait MaxSize extends State

A maximum size has been set.

A maximum size has been set.

sealed trait MaxWeight extends State

A maximum weight has been set.

A maximum weight has been set.

sealed trait RecordStats extends State

Stats recording has been enabled.

Stats recording has been enabled.

sealed trait RefreshAfterWrite extends State

Refresh after write behavior has been configured.

Refresh after write behavior has been configured.

sealed trait RemovalListener extends State

A removal listener has been configured

A removal listener has been configured

sealed trait Unconfigured extends State

Nothing configured yet.

Nothing configured yet.

Implicits

Implicits

implicit def conflict[S1 <: State, S2 <: State]: Conflict[S1, S2]
@implicitAmbiguous("enableScheduling can only be configured once")
@implicitAmbiguous("evictionListener can only be configured once")
@implicitAmbiguous("expireAfterAccess is incompatible with expireAfter")
@implicitAmbiguous("expireAfter can only be configured once")
@implicitAmbiguous("expireAfterAccess can only be configured once")
@implicitAmbiguous("expireAfterWrite can only be configured once")
@implicitAmbiguous("expireAfter is incompatible with expireAfterAccess")
@implicitAmbiguous("expireAfter is incompatible with expireAfterWrite")
@implicitAmbiguous("expireAfterWrite is incompatible with expireAfter")
@implicitAmbiguous("initialCapacity can only be configured once")
@implicitAmbiguous("maximumSize can only be configured once")
implicit def maxSize1[S <: State]: Conflict[MaxSize, S & MaxSize]
implicit def maxSize2[S <: State]: Conflict[MaxSize, S & MaxSize]
@implicitAmbiguous("setting maxSize is incompatible with maxWeight")
@implicitAmbiguous("maximumWeight can only be configured once")
implicit def maxWeight1[S <: State]: Conflict[MaxWeight, S & MaxWeight]
implicit def maxWeight2[S <: State]: Conflict[MaxWeight, S & MaxWeight]
@implicitAmbiguous("setting maxWeight is incompatible with maxSize")
@implicitAmbiguous("recordStats can only be configured once")
@implicitAmbiguous("refreshAfterWrite can only be configured once")
@implicitAmbiguous("removalListener can only be configured once")