|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmondrian.server.MonitorImpl
class MonitorImpl
Process that reads from the monitor stream and updates counters.
Internally, uses a dedicated thread to process events. Events received from log4j are placed on a queue. This "Active object" or "Actor" pattern means that the data structures that hold counters do not need to be locked.
Command requests are treated like events. They place their result on a result queue.
A visitor quickly dispatches events and commands
to the appropriate handler method.
The monitored objects form a hierarchy. For each object type, there is
a mutable workspace (whose members are private and non-final) that is
converted into a monitor object (whose members are public and final) when
its fix() method is called:
MutableServerInfo → ServerInfoMutableConnectionInfo → ConnectionInfoMutableStatementInfo
→ StatementInfoMutableExecutionInfo
→ ExecutionInfoMutableSqlStatementInfo
→ SqlStatementInfo
| Nested Class Summary | |
|---|---|
(package private) static class |
MonitorImpl.Command
A kind of message that produces a response. |
(package private) static interface |
MonitorImpl.CommandVisitor<T>
Extension to Visitor to allow commands as well as events. |
(package private) static class |
MonitorImpl.ConnectionsCommand
|
(package private) static class |
MonitorImpl.ServerCommand
|
(package private) static class |
MonitorImpl.ShutdownCommand
|
(package private) static class |
MonitorImpl.SqlStatementsCommand
|
(package private) static class |
MonitorImpl.StatementsCommand
|
| Field Summary | |
|---|---|
protected static Util.MemoryInfo |
MEMORY_INFO
|
| Constructor Summary | |
|---|---|
MonitorImpl()
Creates a Monitor. |
|
| Method Summary | |
|---|---|
List<ConnectionInfo> |
getConnections()
|
ServerInfo |
getServer()
|
List<SqlStatementInfo> |
getSqlStatements()
|
List<StatementInfo> |
getStatements()
|
void |
sendEvent(Event event)
Sends an event to the monitor. |
void |
shutdown()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final Util.MemoryInfo MEMORY_INFO
| Constructor Detail |
|---|
public MonitorImpl()
| Method Detail |
|---|
public void shutdown()
public void sendEvent(Event event)
Monitor
sendEvent in interface Monitorevent - Eventpublic ServerInfo getServer()
getServer in interface Monitorpublic List<ConnectionInfo> getConnections()
getConnections in interface Monitorpublic List<StatementInfo> getStatements()
getStatements in interface Monitorpublic List<SqlStatementInfo> getSqlStatements()
getSqlStatements in interface Monitor
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||