trait Counting extends Locking
A simple class that enables the counting of something.
Examples:
- How often is a function called during runtime?
- How often runs the program in a specific case?
Thread Safety
This class is thread safe.
- Source
- Counting.scala
- Alphabetic
- By Inheritance
- Counting
- Locking
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- def doGetCount(s: Symbol): Long
Called by the
getCount(Symbol)
method.Called by the
getCount(Symbol)
method.Thread Safety
The
getCount
method takes care of the synchronization.- Attributes
- protected[this]
- def doUpdateCount(s: Symbol, value: Long): Unit
Called by the
updateCount(Symbol, Int)
method.Called by the
updateCount(Symbol, Int)
method.Thread Safety
The
updateCount
method takes care of the synchronization.- Attributes
- protected[this]
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def getCount(s: Symbol): Long
Returns the overall
count
that has been summed up with the given symbols
. - def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- final def incrementCount(s: Symbol): Unit
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- def reset(s: Symbol): Unit
Resets the overall count of the given symbol.
- def resetAll(): Unit
Resets everything.
Resets everything. The effect is comparable to creating a new instance, but is more efficient.
- final val rwLock: ReentrantReadWriteLock
- Attributes
- protected[this]
- Definition Classes
- Locking
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def updateCount(s: Symbol, value: Long): Unit
Updates the count related to the entity identified by the given symbol.
Updates the count related to the entity identified by the given symbol.
If the passed
value
is positive the count will be increased whereas it will be decreased when a negative number is passed.- s
Symbol used to correlate values related to the same entity.
- value
The value that will be added to the entity's current value.
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def withReadLock[B](f: => B): B
Acquires the read lock associated with this instance and then executes the function
f
.Acquires the read lock associated with this instance and then executes the function
f
. Afterwards, the lock is released.- Attributes
- protected[this]
- Definition Classes
- Locking
- Annotations
- @inline()
- final def withWriteLock[B](f: => B): B
Acquires the write lock associated with this instance and then executes the function
f
.Acquires the write lock associated with this instance and then executes the function
f
. Afterwards, the lock is released.- Attributes
- protected[this]
- Definition Classes
- Locking
- Annotations
- @inline()
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated