SpaceDefMonitor

The SpaceDefMonitor example creates a SpaceDefListener for a metaspace. The listener callback is invoked whenever a space is defined or dropped from the metaspace. The listener callback displays information about the event that caused it to be invoked.

SpaceDefMonitor is only interested in events that affect the definition of spaces in a metaspace. If SpaceDefMonitor connects to a metaspace with existing spaces, it displays information about those spaces when it first starts up, and then displays information about spaces as they are defined in or dropped from the metaspace.