public class ParallelTask extends Object
ParallelTaskBuilder.execute(io.parallec.core.ParallecResponseHandler)
| Modifier and Type | Field and Description |
|---|---|
akka.actor.ActorRef |
executionManager
The command manager.
|
| Constructor and Description |
|---|
ParallelTask()
Instantiates a new parallel task.
|
ParallelTask(RequestProtocol requestProtocol,
int concurrency,
HttpMeta httpMeta,
TargetHostMeta targetHostMeta,
SshMeta sshMeta,
TcpMeta tcpMeta,
UdpMeta udpMeta,
PingMeta pingMeta,
ParallecResponseHandler handler,
Map<String,Object> responseContext,
Map<String,StrStrMap> replacementVarMapNodeSpecific,
Map<String,String> replacementVarMap,
RequestReplacementType requestReplacementType,
ParallelTaskConfig config)
Instantiates a new parallel task.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
cancel(boolean sync)
Cancel.
|
boolean |
cancelOnTargetHosts(List<String> targetHosts)
Cancel on target hosts.
|
int |
capacityUsed()
Capacity used.
|
String |
generateTaskId()
Gen job id.
|
String |
getAggregatedResultHumanStr()
Gets the aggregated result human str.
|
Map<String,Integer> |
getAggregateResultCountSummary()
Gets the aggregate result count summary.
|
Map<String,SetAndCount> |
getAggregateResultFullSummary()
Aggregate results to see the status code distribution with target hosts.
|
Map<String,LinkedHashSet<String>> |
getAggregateResultMap()
Gets the aggregate result map.
|
com.ning.http.client.AsyncHttpClient |
getAsyncHttpClient()
Gets the async http client.
|
int |
getConcurrency()
Gets the concurrency.
|
ParallelTaskConfig |
getConfig()
Gets the config.
|
double |
getDurationSec()
Gets the duration sec.
|
long |
getExecuteStartTime()
Gets the execute start time.
|
long |
getExecutionEndTime()
Gets the execution end time.
|
ParallecResponseHandler |
getHandler()
Gets the handler.
|
HttpMeta |
getHttpMeta()
Gets the command meta.
|
Map<String,NodeReqResponse> |
getParallelTaskResult()
Gets the parallel task result.
|
PingMeta |
getPingMeta()
Gets the ping meta.
|
Double |
getProgress()
Gets the progress.
|
Map<String,String> |
getReplacementVarMap()
Gets the replacement var map.
|
Map<String,StrStrMap> |
getReplacementVarMapNodeSpecific()
Gets the replacement var map node specific.
|
int |
getRequestNum()
Gets the request num.
|
int |
getRequestNumActual()
Gets the request num actual.
|
RequestProtocol |
getRequestProtocol()
Gets the request protocol.
|
RequestReplacementType |
getRequestReplacementType()
Gets the request replacement type.
|
Map<String,Object> |
getResponseContext()
Gets the response context.
|
int |
getResponsedNum()
Gets the responsed num.
|
SshMeta |
getSshMeta()
Gets the ssh meta.
|
ParallelTaskState |
getState()
Gets the state.
|
long |
getSubmitTime()
Gets the submit time.
|
TargetHostMeta |
getTargetHostMeta()
Gets the target host meta.
|
List<TaskErrorMeta> |
getTaskErrorMetas()
Gets the task error metas.
|
String |
getTaskId()
Gets the task id.
|
TcpMeta |
getTcpMeta()
Gets the tcp meta.
|
UdpMeta |
getUdpMeta() |
boolean |
isCompleted()
state==ParallelTaskState.COMPLETED_WITHOUT_ERROR ||
state==ParallelTaskState.COMPLETED_WITH_ERROR;
|
String |
prettyPrintInfo()
Pretty print info.
|
boolean |
saveLogToLocal()
Save log to local.
|
boolean |
saveLogToLocal(String path)
Save log to local.
|
void |
setAsyncHttpClient(com.ning.http.client.AsyncHttpClient asyncHttpClient)
Sets the async http client.
|
void |
setConcurrency(int concurrency)
Sets the concurrency.
|
void |
setConfig(ParallelTaskConfig config)
Sets the config.
|
void |
setDurationSec(double durationSec)
Sets the duration sec.
|
void |
setExecuteStartTime(long executeStartTime)
Sets the execute start time.
|
void |
setExecutionEndTime(long executionEndTime)
Sets the execution end time.
|
void |
setHandler(ParallecResponseHandler handler)
Sets the handler.
|
void |
setHttpMeta(HttpMeta httpMeta)
Sets the command meta.
|
void |
setParallelTaskResult(Map<String,NodeReqResponse> parallelTaskResult)
Sets the parallel task result.
|
void |
setPingMeta(PingMeta pingMeta)
Sets the ping meta.
|
void |
setRequestNum(int requestNum)
Sets the request num.
|
void |
setRequestNumActual(int requestNumActual)
Sets the request num actual.
|
void |
setRequestProtocol(RequestProtocol requestProtocol)
Sets the request protocol.
|
void |
setRequestReplacementType(RequestReplacementType requestReplacementType)
Sets the request replacement type.
|
void |
setResponseContext(Map<String,Object> responseContext)
Sets the response context.
|
void |
setResponsedNum(int responsedNum)
Sets the responsed num.
|
void |
setSshMeta(SshMeta sshMeta)
Sets the ssh meta.
|
void |
setState(ParallelTaskState state)
Sets the state.
|
void |
setSubmitTime(long submitTime)
Sets the submit time.
|
void |
setTargetHostMeta(TargetHostMeta targetHostMeta)
Sets the target host meta.
|
void |
setTaskId(String taskId)
Sets the task id.
|
void |
setTcpMeta(TcpMeta tcpMeta)
Sets the tcp meta.
|
void |
setUdpMeta(UdpMeta udpMeta) |
String |
toString() |
boolean |
validateWithFillDefault()
will do validation.
|
public akka.actor.ActorRef executionManager
public ParallelTask()
public ParallelTask(RequestProtocol requestProtocol, int concurrency, HttpMeta httpMeta, TargetHostMeta targetHostMeta, SshMeta sshMeta, TcpMeta tcpMeta, UdpMeta udpMeta, PingMeta pingMeta, ParallecResponseHandler handler, Map<String,Object> responseContext, Map<String,StrStrMap> replacementVarMapNodeSpecific, Map<String,String> replacementVarMap, RequestReplacementType requestReplacementType, ParallelTaskConfig config)
requestProtocol - the request protocolconcurrency - the concurrencyhttpMeta - the http metatargetHostMeta - the target host metasshMeta - the ssh metatcpMeta - the tcp metaudpMeta - the udp metapingMeta - the ping metahandler - the handlerresponseContext - the response contextreplacementVarMapNodeSpecific - the replacement var map node specificreplacementVarMap - the replacement var maprequestReplacementType - the request replacement typeconfig - the configpublic boolean cancelOnTargetHosts(List<String> targetHosts)
targetHosts - the target hostspublic boolean cancel(boolean sync)
sync - the syncpublic int capacityUsed()
public boolean validateWithFillDefault()
throws ParallelTaskInvalidException
ParallelTaskInvalidException - the parallel task invalid exceptionpublic String generateTaskId()
public Double getProgress()
public boolean isCompleted()
public com.ning.http.client.AsyncHttpClient getAsyncHttpClient()
public void setAsyncHttpClient(com.ning.http.client.AsyncHttpClient asyncHttpClient)
asyncHttpClient - the new async http clientpublic Map<String,NodeReqResponse> getParallelTaskResult()
public void setParallelTaskResult(Map<String,NodeReqResponse> parallelTaskResult)
parallelTaskResult - the parallel task resultpublic Map<String,StrStrMap> getReplacementVarMapNodeSpecific()
public Map<String,String> getReplacementVarMap()
public RequestReplacementType getRequestReplacementType()
public void setRequestReplacementType(RequestReplacementType requestReplacementType)
requestReplacementType - the new request replacement typepublic List<TaskErrorMeta> getTaskErrorMetas()
public SshMeta getSshMeta()
public void setSshMeta(SshMeta sshMeta)
sshMeta - the new ssh metapublic Map<String,Object> getResponseContext()
public TargetHostMeta getTargetHostMeta()
public void setTargetHostMeta(TargetHostMeta targetHostMeta)
targetHostMeta - the new target host metapublic HttpMeta getHttpMeta()
public void setHttpMeta(HttpMeta httpMeta)
httpMeta - the new http metapublic String getTaskId()
public void setTaskId(String taskId)
taskId - the new task idpublic void setResponseContext(Map<String,Object> responseContext)
responseContext - the response contextpublic ParallelTaskConfig getConfig()
public void setConfig(ParallelTaskConfig config)
config - the new configpublic String prettyPrintInfo()
public boolean saveLogToLocal(String path)
path - the pathpublic boolean saveLogToLocal()
public long getExecutionEndTime()
public void setExecutionEndTime(long executionEndTime)
executionEndTime - the new execution end timepublic Map<String,SetAndCount> getAggregateResultFullSummary()
public String getAggregatedResultHumanStr()
public Map<String,Integer> getAggregateResultCountSummary()
public Map<String,LinkedHashSet<String>> getAggregateResultMap()
public double getDurationSec()
public void setDurationSec(double durationSec)
durationSec - the new duration secpublic TcpMeta getTcpMeta()
public void setTcpMeta(TcpMeta tcpMeta)
tcpMeta - the new tcp metapublic RequestProtocol getRequestProtocol()
public void setRequestProtocol(RequestProtocol requestProtocol)
requestProtocol - the new request protocolpublic int getConcurrency()
public void setConcurrency(int concurrency)
concurrency - the new concurrencypublic long getSubmitTime()
public void setSubmitTime(long submitTime)
submitTime - the new submit timepublic long getExecuteStartTime()
public void setExecuteStartTime(long executeStartTime)
executeStartTime - the new execute start timepublic int getRequestNum()
public void setRequestNum(int requestNum)
requestNum - the new request numpublic int getRequestNumActual()
public void setRequestNumActual(int requestNumActual)
requestNumActual - the new request num actualpublic int getResponsedNum()
public void setResponsedNum(int responsedNum)
responsedNum - the new responsed numpublic ParallelTaskState getState()
public void setState(ParallelTaskState state)
state - the new statepublic ParallecResponseHandler getHandler()
public void setHandler(ParallecResponseHandler handler)
handler - the new handlerpublic PingMeta getPingMeta()
public void setPingMeta(PingMeta pingMeta)
pingMeta - the new ping metapublic UdpMeta getUdpMeta()
public void setUdpMeta(UdpMeta udpMeta)
Copyright © 2015–2016 eBay. All rights reserved.