CachedArrayList
class. This class wraps a synchronized ArrayList to provide an optimized toArray()
method that returns an internally cached array, rather than a new array generated per toArray()
invocation.
Use of the class by the Manager results in toArray()
being invoked far more often than any other method. Caching the value toArray
normally returns is intended to be a performance optimization.
The cached array value is updated upon each write operation to the List.
REVISIT(MC): investigate using FastArrayList from collections ?
|
|