# Class MemRepositoryDriver

java.lang.Object
com.snmp4j.smi.util.MemRepositoryDriver

All Implemented Interfaces:
  `RepositoryDriver`

public class MemRepositoryDriver extends Object implements RepositoryDriver
MemRepositoryDriver is a `RepositoryDriver` which stores all MIB modules in memory. Caution: This repository driver does not store the MIB modules persistently!

Author:
  Frank Fock

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `MemRepositoryDriver()`
  Creates a new in-memory MIB module repository with an empty module store.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `deleteModule(RepositoryIO event)`
  Requests deletion of the MIB module identified by the module name supplied with the `RepositoryIO` object.
  `String[]`
  `listModuleNames()`
  Enumerates the available MIB module names in the repository.
  `void`
  `readModule(RepositoryIO event)`
  Requests to read a MIB module with the name specified in the supplied event object.
  `void`
  `writeModule(RepositoryIO event)`
  Requests to write a MIB module with the name specified in the supplied event object.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### MemRepositoryDriver

    public MemRepositoryDriver()
    Creates a new in-memory MIB module repository with an empty module store.

- ## Method Details

  - ### writeModule

    public void writeModule(RepositoryIO event)
    Description copied from interface: `RepositoryDriver`
    Requests to write a MIB module with the name specified in the supplied event object. Implementations of this method should set the `OutputStream` member of the supplied event object.
    Specified by:
      `writeModule` in interface `RepositoryDriver`
    Parameters:
      `event` - a `RepositoryIO` with the module name of the MIB module that should be written to persistent storage. The implementation of this interface should set the `OutputStream` of `event`.

  - ### readModule

    public void readModule(RepositoryIO event)
    Description copied from interface: `RepositoryDriver`
    Requests to read a MIB module with the name specified in the supplied event object. Implementations of this method should set the `InputStream` member of the supplied event object.
    Specified by:
      `readModule` in interface `RepositoryDriver`
    Parameters:
      `event` - a `RepositoryIO` with the module name of the MIB module that should be read from persistent storage. The implementation of this interface should set the `InputStream` of `event`.

  - ### deleteModule

    public void deleteModule(RepositoryIO event)
    Description copied from interface: `RepositoryDriver`
    Requests deletion of the MIB module identified by the module name supplied with the `RepositoryIO` object.
    Specified by:
      `deleteModule` in interface `RepositoryDriver`
    Parameters:
      `event` - a `RepositoryIO` with the module name of the MIB module that should be removed from persistent MIB repository storage. If a listener has successfully removed the module, it must set the corresponding flag in the supplied event object.

  - ### listModuleNames

    public String[] listModuleNames()
    Description copied from interface: `RepositoryDriver`
    Enumerates the available MIB module names in the repository.
    Specified by:
      `listModuleNames` in interface `RepositoryDriver`
    Returns:
      a list of MIB module names or `null` if that method is not supported by the listener.