object
CyclicIncrementProvider
Value Members
-
final
def
!=(arg0: AnyRef): Boolean
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
final
def
==(arg0: AnyRef): Boolean
-
final
def
==(arg0: Any): Boolean
-
def
apply[K](zero: K, currentSide: Side, currentSideCount: Int, maxCurrentSideVal: K, nextSideCount: Int, maxNextSideVal: K)(implicit arg0: Successible[K]): CyclicIncrementProvider[K]
-
def
apply[K](zero: K)(implicit arg0: Successible[K]): CyclicIncrementProvider[K]
-
final
def
asInstanceOf[T0]: T0
-
def
clone(): AnyRef
-
final
def
eq(arg0: AnyRef): Boolean
-
def
equals(arg0: Any): Boolean
-
def
finalize(): Unit
-
final
def
getClass(): Class[_]
-
def
hashCode(): Int
-
-
final
def
isInstanceOf[T0]: Boolean
-
final
def
ne(arg0: AnyRef): Boolean
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
Inherited from AnyRef
Inherited from Any
This is an immutable implementation of a provider of cyclical increments. The motivation is that we need ordered identifiers for caches, but we do not want to just increment an int as this has a theoretical upper limit (this is functional programming, our stuff doesn't crash, right?). This class allows the reuse of numbers, making it highly unlikely to run out of identifiers (it is still possible, but in a way that would be unavoidable -- if there is a key that stays in the stacks forever, thus never allowing us to reuse the increments after that key). This class ensures that when it is asked for a new increment, it will be greater than all currently outstanding increments at that time.