org.mbari.beholder
Members list
Packages
Type members
Classlikes
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
AppConfig.type
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
class JpegCacheclass JpegCache2
Information about the source of a JPEG
Information about the source of a JPEG
Value parameters
- created
-
When the jpeg was created. Used by the cache to determine which items to drop.
- elapsedTime
-
The elapsed time into the video that the jpeg was taken
- path
-
The local path to the jpeg file
- sizeBytes
-
The size of the jpeg file in bytes
- videoUri
-
The URL to the source video
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
In memory cache of paths to Jpegs that were captured. The cache is organized by videoUrl and elpased time into the video. When the cache on disk size exceeds the allowed size, the oldest jpegs are cleared out of the cache and removed from disk. The number of jpegs removed is specified by the cacheClearPct.
In memory cache of paths to Jpegs that were captured. The cache is organized by videoUrl and elpased time into the video. When the cache on disk size exceeds the allowed size, the oldest jpegs are cleared out of the cache and removed from disk. The number of jpegs removed is specified by the cacheClearPct.
Jpegs are expected to be stored in jpegs named as follows:
Value parameters
- cacheClearPct
-
When the maxCacheSizeMB is receached this, disk will be freed equal to maxCacheSizeMb * cacheClearPct
- maxCacheSizeMB
-
The max allowed on-disk size of the cache
- root
-
The root directory of the cache
Attributes
- Supertypes
Disk-backed JPEG frame cache. Frames are indexed by (videoUri, elapsedTime) for O(1) lookups and evicted oldest-first when total on-disk size exceeds maxCacheSizeMB.
Disk-backed JPEG frame cache. Frames are indexed by (videoUri, elapsedTime) for O(1) lookups and evicted oldest-first when total on-disk size exceeds maxCacheSizeMB.
Improvements over JpegCache:
- O(1) lookup via nested ConcurrentHashMap (URI → elapsedMs → Jpeg) instead of O(n) TreeSet.find
- O(log n) eviction via ConcurrentSkipListSet ordered by creation time; pollFirst() is atomic
- AtomicLong byte counter avoids floating-point drift from summing MB values
- AtomicBoolean eviction guard prevents concurrent eviction storms without a global lock
- scanCache preserves real file creation timestamps for correct age-ordering on restart
Value parameters
- cacheClearPct
-
Fraction of current cache size to free when the limit is exceeded (0 < x <= 1)
- maxCacheSizeMB
-
Maximum allowed on-disk cache size in MB
- root
-
Root directory for cached JPEG files
Attributes
- Supertypes
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Supertypes
-
trait Callable[Int]class Objecttrait Matchableclass Any