@InterfaceAudience.Private public class MonitoredRPCHandlerImpl extends Object implements MonitoredRPCHandler
MonitoredTask.State| Modifier and Type | Field and Description |
|---|---|
protected MonitoredTask.State |
state |
| Constructor and Description |
|---|
MonitoredRPCHandlerImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
abort(String msg) |
void |
cleanup()
Explicitly mark this status as able to be cleaned up,
even though it might not be complete.
|
MonitoredRPCHandlerImpl |
clone()
Public exposure of Object.clone() in order to allow clients to easily
capture current state.
|
void |
expireNow()
Force the completion timestamp backwards so that
it expires now.
|
String |
getClient()
If an RPC call is currently running, produces a String representation of
the connection from which it was received.
|
long |
getCompletionTimestamp() |
String |
getDescription() |
String |
getRPC()
Produces a string representation of the method currently being serviced
by this Handler.
|
String |
getRPC(boolean withParams)
Produces a string representation of the method currently being serviced
by this Handler.
|
long |
getRPCPacketLength()
Produces a string representation of the method currently being serviced
by this Handler.
|
long |
getRPCQueueTime()
Accesses the queue time for the currently running RPC on the
monitored Handler.
|
long |
getRPCStartTime()
Accesses the start time for the currently running RPC on the
monitored Handler.
|
long |
getStartTime() |
MonitoredTask.State |
getState() |
long |
getStateTime() |
String |
getStatus()
Gets the status of this handler; if it is currently servicing an RPC,
this status will include the RPC information.
|
long |
getStatusTime() |
boolean |
isOperationRunning()
Indicates to the client whether this task is monitoring a currently active
RPC call to a database command.
|
boolean |
isRPCRunning()
Indicates to the client whether this task is monitoring a currently active
RPC call.
|
void |
markComplete(String status) |
void |
pause(String msg) |
void |
resume(String msg) |
void |
setConnection(String clientAddress,
int remotePort)
Registers current handler client details.
|
void |
setDescription(String description) |
void |
setRPC(String methodName,
Object[] params,
long queueTime)
Tells this instance that it is monitoring a new RPC call.
|
void |
setRPCPacket(com.google.protobuf.Message param)
Gives this instance a reference to the protobuf received by the RPC, so
that it can later compute its size if asked for it.
|
protected void |
setState(MonitoredTask.State state) |
void |
setStatus(String status) |
String |
toJSON()
Creates a JSON object for parseable exposure of monitored tasks.
|
Map<String,Object> |
toMap()
Creates a string map of internal details for extensible exposure of
monitored tasks.
|
String |
toString() |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitabort, cleanup, expireNow, getCompletionTimestamp, getDescription, getStartTime, getState, getStateTime, getStatusTime, pause, resume, setDescription, setStatus, toJSONprotected volatile MonitoredTask.State state
public MonitoredRPCHandlerImpl clone()
MonitoredTaskclone in interface MonitoredTaskpublic String getStatus()
getStatus in interface MonitoredTaskpublic long getRPCQueueTime()
getRPCQueueTime in interface MonitoredRPCHandlerpublic long getRPCStartTime()
getRPCStartTime in interface MonitoredRPCHandlerpublic String getRPC()
getRPC in interface MonitoredRPCHandlerpublic String getRPC(boolean withParams)
getRPC in interface MonitoredRPCHandlerwithParams - toggle inclusion of parameters in the RPC Stringpublic long getRPCPacketLength()
getRPCPacketLength in interface MonitoredRPCHandlerpublic String getClient()
getClient in interface MonitoredRPCHandlerpublic boolean isRPCRunning()
isRPCRunning in interface MonitoredRPCHandlerpublic boolean isOperationRunning()
isOperationRunning in interface MonitoredRPCHandlerpublic void setRPC(String methodName, Object[] params, long queueTime)
setRPC in interface MonitoredRPCHandlermethodName - The name of the method that will be called by the RPC.params - The parameters that will be passed to the indicated method.public void setRPCPacket(com.google.protobuf.Message param)
setRPCPacket in interface MonitoredRPCHandlerparam - The protobuf received by the RPC for this callpublic void setConnection(String clientAddress, int remotePort)
setConnection in interface MonitoredRPCHandlerclientAddress - the address of the current clientremotePort - the port from which the client connectedpublic void markComplete(String status)
markComplete in interface MonitoredTaskpublic Map<String,Object> toMap()
MonitoredTasktoMap in interface MonitoredTaskpublic String toString()
public long getStartTime()
getStartTime in interface MonitoredTaskpublic String getDescription()
getDescription in interface MonitoredTaskpublic long getStatusTime()
getStatusTime in interface MonitoredTaskpublic MonitoredTask.State getState()
getState in interface MonitoredTaskpublic long getStateTime()
getStateTime in interface MonitoredTaskpublic long getCompletionTimestamp()
getCompletionTimestamp in interface MonitoredTaskpublic void pause(String msg)
pause in interface MonitoredTaskpublic void resume(String msg)
resume in interface MonitoredTaskpublic void abort(String msg)
abort in interface MonitoredTaskpublic void setStatus(String status)
setStatus in interface MonitoredTaskprotected void setState(MonitoredTask.State state)
public void setDescription(String description)
setDescription in interface MonitoredTaskpublic void cleanup()
MonitoredTaskcleanup in interface MonitoredTaskpublic void expireNow()
expireNow in interface MonitoredTaskpublic String toJSON() throws IOException
MonitoredTasktoJSON in interface MonitoredTaskIOExceptionCopyright © 2014 The Apache Software Foundation. All rights reserved.