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.
- Alphabetic
- By Inheritance
- Counting
- Locking
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
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[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
doGetCount(s: Symbol): Long
Called by the
getCount(Symbol)method.Called by the
getCount(Symbol)method.Thread Safety
The
getCountmethod 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
updateCountmethod takes care of the synchronization.- Attributes
- protected[this]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
getCount(s: Symbol): Long
Returns the overall
countthat has been summed up with the given symbols. -
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- 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()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
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
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
valueis 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(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
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
-
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