Search documentation of snmpkit

# SnmpKit.SnmpSim.LazyDevicePool (snmpkit v1.3.17)

Lazy Device Pool Manager for on-demand device creation and lifecycle management. Supports 10K+ devices with minimal memory footprint through lazy instantiation.

Features:

- On-demand device creation when first accessed
- Automatic cleanup of idle devices to conserve resources
- Port-based device type determination
- Efficient tracking of active devices and last access times
- Resource monitoring and cleanup scheduling

# Summary

## Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

cleanup_idle_devices()

Force cleanup of idle devices immediately.

clear_cache()

Clear the device cache - alias for shutdown_all_devices for compatibility.

configure_port_assignments(port_assignments)

Configure device types for specific port ranges.

get_or_create_device(port)

Get or create a device for the specified port. Creates the device on first access if it doesn't exist.

get_stats()

Get statistics about the device pool.

init(opts)

Callback implementation for `GenServer.init/1`.

shutdown_all_devices()

Shutdown all devices and reset the pool.

shutdown_device(port)

Shutdown a specific device.

start_device_population(device_configs, opts \\ [])
start_link(opts \\ [])

# Functions

# child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# cleanup_idle_devices()

Force cleanup of idle devices immediately.

# clear_cache()

Clear the device cache - alias for shutdown_all_devices for compatibility.

# configure_port_assignments(port_assignments)

Configure device types for specific port ranges.

# get_or_create_device(port)

Get or create a device for the specified port. Creates the device on first access if it doesn't exist.

# get_stats()

Get statistics about the device pool.

# init(opts)

Callback implementation for `GenServer.init/1`.

# shutdown_all_devices()

Shutdown all devices and reset the pool.

# shutdown_device(port)

Shutdown a specific device.

# start_device_population(device_configs, opts \\ [])

# start_link(opts \\ [])