@InterfaceAudience.Private class MonitoredTaskImpl extends Object implements MonitoredTask
Modifier and Type | Class and Description |
---|---|
private static class |
MonitoredTaskImpl.StatusJournalEntryImpl |
MonitoredTask.State, MonitoredTask.StatusJournalEntry
Modifier and Type | Field and Description |
---|---|
private String |
description |
private static org.apache.hbase.thirdparty.com.google.gson.Gson |
GSON |
private ConcurrentLinkedQueue<MonitoredTask.StatusJournalEntry> |
journal |
private long |
startTime |
protected MonitoredTask.State |
state |
private long |
stateTime |
private String |
status |
private long |
statusTime |
private long |
warnTime |
Constructor and Description |
---|
MonitoredTaskImpl(boolean enableJournal) |
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.
|
MonitoredTaskImpl |
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.
|
long |
getCompletionTimestamp() |
String |
getDescription() |
long |
getStartTime() |
MonitoredTask.State |
getState() |
long |
getStateTime() |
String |
getStatus() |
List<MonitoredTask.StatusJournalEntry> |
getStatusJournal()
Returns the status journal.
|
long |
getStatusTime() |
long |
getWarnTime() |
void |
markComplete(String status) |
void |
pause(String msg) |
String |
prettyPrintJournal() |
void |
resume(String msg) |
void |
setDescription(String description) |
protected void |
setState(MonitoredTask.State state) |
void |
setStatus(String status) |
void |
setWarnTime(long t) |
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() |
private long startTime
private long statusTime
private long stateTime
private long warnTime
private volatile String description
protected volatile MonitoredTask.State state
private final ConcurrentLinkedQueue<MonitoredTask.StatusJournalEntry> journal
private static final org.apache.hbase.thirdparty.com.google.gson.Gson GSON
public MonitoredTaskImpl(boolean enableJournal)
public MonitoredTaskImpl clone()
MonitoredTask
clone
in interface MonitoredTask
clone
in class Object
public long getStartTime()
getStartTime
in interface MonitoredTask
public String getDescription()
getDescription
in interface MonitoredTask
public String getStatus()
getStatus
in interface MonitoredTask
public long getStatusTime()
getStatusTime
in interface MonitoredTask
public MonitoredTask.State getState()
getState
in interface MonitoredTask
public long getStateTime()
getStateTime
in interface MonitoredTask
public long getWarnTime()
getWarnTime
in interface MonitoredTask
public long getCompletionTimestamp()
getCompletionTimestamp
in interface MonitoredTask
public void markComplete(String status)
markComplete
in interface MonitoredTask
public void pause(String msg)
pause
in interface MonitoredTask
public void resume(String msg)
resume
in interface MonitoredTask
public void abort(String msg)
abort
in interface MonitoredTask
public void setStatus(String status)
setStatus
in interface MonitoredTask
protected void setState(MonitoredTask.State state)
public void setDescription(String description)
setDescription
in interface MonitoredTask
public void setWarnTime(long t)
setWarnTime
in interface MonitoredTask
public void cleanup()
MonitoredTask
cleanup
in interface MonitoredTask
public void expireNow()
expireNow
in interface MonitoredTask
public Map<String,Object> toMap()
MonitoredTask
toMap
in interface MonitoredTask
public String toJSON() throws IOException
MonitoredTask
toJSON
in interface MonitoredTask
IOException
public List<MonitoredTask.StatusJournalEntry> getStatusJournal()
getStatusJournal
in interface MonitoredTask
public String prettyPrintJournal()
prettyPrintJournal
in interface MonitoredTask
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.