EnvVolumeTracker

abstract class EnvVolumeTracker<VolumeT : EnvVolume>(setCreator: () -> MutableSet<VolumeT>? = null) : AutoCloseableInstanceTracker<VolumeT>

A resource tracker for tracking a collection of EnvVolume.

This class implements AutoCloseable to allow owners to clean up volumes after use.

Parameters

setCreator

Creator for the Set used to track instances.

Constructors

Link copied to clipboard
constructor(setCreator: () -> MutableSet<VolumeT>? = null)

Properties

Link copied to clipboard
protected val instances: MutableSet<VolumeT>
Link copied to clipboard
private val isBound: AtomicBoolean
Link copied to clipboard
private val unbindOnClose: Boolean

Functions

Link copied to clipboard
fun add(instance: VolumeT): Boolean
Link copied to clipboard
override fun close()
Link copied to clipboard
fun list(): Set<VolumeT>
Link copied to clipboard
fun remove(instance: VolumeT): Boolean
Link copied to clipboard
suspend fun unbind()
Link copied to clipboard
protected open suspend override fun unbindImpl()

Removes all tracked volumes from the environment virtualization framework, and clears the tracking data.