R
- the return type of the called functionpublic class LocalCall<R> extends AbstractCall<R>
Constructor and Description |
---|
LocalCall(String functionName,
Optional<List<?>> arg,
Optional<Map<String,?>> kwarg,
com.google.gson.reflect.TypeToken<R> returnType) |
LocalCall(String functionName,
Optional<List<?>> arg,
Optional<Map<String,?>> kwarg,
com.google.gson.reflect.TypeToken<R> returnType,
Optional<?> metadata) |
LocalCall(String functionName,
Optional<List<?>> arg,
Optional<Map<String,?>> kwarg,
com.google.gson.reflect.TypeToken<R> returnType,
Optional<?> metadata,
Optional<Integer> timeout,
Optional<Integer> gatherJobTimeout) |
LocalCall(String functionName,
Optional<List<?>> arg,
Optional<Map<String,?>> kwarg,
com.google.gson.reflect.TypeToken<R> returnType,
Optional<Integer> timeout,
Optional<Integer> gatherJobTimeout) |
Modifier and Type | Method and Description |
---|---|
Map<String,CompletionStage<Result<R>>> |
callAsync(FunctionE<LocalCall<R>,LocalAsyncResult<R>> localAsync,
FunctionE<RunnerCall<Map<String,R>>,RunnerAsyncResult<Map<String,R>>> runnerAsync,
EventStream events,
CompletionStage<GenericError> cancel)
Calls this salt call via the async client and returns the results
as they come in via the event stream.
|
LocalAsyncResult<R> |
callAsync(SaltClient client,
Target<?> target)
Calls a execution module function on the given target asynchronously and
returns information about the scheduled job that can be used to query the result.
|
Map<String,CompletionStage<Result<R>>> |
callAsync(SaltClient client,
Target<?> target,
EventStream events,
CompletionStage<GenericError> cancel)
Calls this salt call via the async client and returns the results
as they come in via the event stream.
|
LocalAsyncResult<R> |
callAsync(SaltClient client,
Target<?> target,
String username,
String password,
AuthModule authModule)
Calls a execution module function on the given target asynchronously and
returns information about the scheduled job that can be used to query the result.
|
Map<String,CompletionStage<Result<R>>> |
callAsync(SaltClient client,
Target<?> target,
String username,
String password,
AuthModule authModule,
EventStream events,
CompletionStage<GenericError> cancel)
Calls this salt call via the async client and returns the results
as they come in via the event stream.
|
Map<String,Result<R>> |
callSync(SaltClient client,
Target<?> target)
Calls a execution module function on the given target and synchronously
waits for the result.
|
List<Map<String,Result<R>>> |
callSync(SaltClient client,
Target<?> target,
Batch batch)
Calls a execution module function on the given target with batching and
synchronously waits for the result.
|
Map<String,Result<R>> |
callSync(SaltClient client,
Target<?> target,
String username,
String password,
AuthModule authModule)
Calls a execution module function on the given target and synchronously
waits for the result.
|
List<Map<String,Result<R>>> |
callSync(SaltClient client,
Target<?> target,
String username,
String password,
AuthModule authModule,
Batch batch)
Calls a execution module function on the given target with batching and
synchronously waits for the result.
|
Map<String,Result<SSHResult<R>>> |
callSyncSSH(SaltClient client,
SSHTarget<?> target,
SaltSSHConfig cfg)
Call an execution module function on the given target via salt-ssh and synchronously
wait for the result.
|
Map<String,Object> |
getPayload()
Return the call payload as a map of key/value pairs.
|
LocalCall<R> |
withMetadata(Object metadata) |
LocalCall<R> |
withoutMetadata() |
LocalCall<R> |
withoutTimeouts() |
LocalCall<R> |
withTimeouts(Optional<Integer> timeout,
Optional<Integer> gatherJobTimeout) |
getFunctionName, getModuleName, getReturnType
public LocalCall(String functionName, Optional<List<?>> arg, Optional<Map<String,?>> kwarg, com.google.gson.reflect.TypeToken<R> returnType, Optional<?> metadata, Optional<Integer> timeout, Optional<Integer> gatherJobTimeout)
public LocalCall(String functionName, Optional<List<?>> arg, Optional<Map<String,?>> kwarg, com.google.gson.reflect.TypeToken<R> returnType, Optional<Integer> timeout, Optional<Integer> gatherJobTimeout)
public LocalCall(String functionName, Optional<List<?>> arg, Optional<Map<String,?>> kwarg, com.google.gson.reflect.TypeToken<R> returnType, Optional<?> metadata)
public LocalCall<R> withTimeouts(Optional<Integer> timeout, Optional<Integer> gatherJobTimeout)
public Map<String,Object> getPayload()
public LocalAsyncResult<R> callAsync(SaltClient client, Target<?> target) throws SaltException
client
- SaltClient instancetarget
- the target for the functionSaltException
- if anything goes wrongpublic Map<String,CompletionStage<Result<R>>> callAsync(SaltClient client, Target<?> target, String username, String password, AuthModule authModule, EventStream events, CompletionStage<GenericError> cancel) throws SaltException
client
- SaltClient instancetarget
- the target for the functionusername
- username for authenticationpassword
- password for authenticationauthModule
- authentication module to useevents
- the event stream to usecancel
- future to cancel the actionSaltException
- if anything goes wrongpublic Map<String,CompletionStage<Result<R>>> callAsync(SaltClient client, Target<?> target, EventStream events, CompletionStage<GenericError> cancel) throws SaltException
client
- SaltClient instancetarget
- the target for the functionevents
- the event stream to usecancel
- future to cancel the actionSaltException
- if anything goes wrongpublic Map<String,CompletionStage<Result<R>>> callAsync(FunctionE<LocalCall<R>,LocalAsyncResult<R>> localAsync, FunctionE<RunnerCall<Map<String,R>>,RunnerAsyncResult<Map<String,R>>> runnerAsync, EventStream events, CompletionStage<GenericError> cancel) throws SaltException
localAsync
- function providing callAsync for LocalCallsrunnerAsync
- function providing callAsync for RunnerCallsevents
- the event stream to usecancel
- future to cancel the actionSaltException
- if anything goes wrongpublic LocalAsyncResult<R> callAsync(SaltClient client, Target<?> target, String username, String password, AuthModule authModule) throws SaltException
client
- SaltClient instancetarget
- the target for the functionusername
- username for authenticationpassword
- password for authenticationauthModule
- authentication module to useSaltException
- if anything goes wrongpublic Map<String,Result<R>> callSync(SaltClient client, Target<?> target) throws SaltException
client
- SaltClient instancetarget
- the target for the functionSaltException
- if anything goes wrongpublic List<Map<String,Result<R>>> callSync(SaltClient client, Target<?> target, Batch batch) throws SaltException
client
- SaltClient instancetarget
- the target for the functionbatch
- the batch specificationSaltException
- if anything goes wrongpublic Map<String,Result<R>> callSync(SaltClient client, Target<?> target, String username, String password, AuthModule authModule) throws SaltException
client
- SaltClient instancetarget
- the target for the functionusername
- username for authenticationpassword
- password for authenticationauthModule
- authentication module to useSaltException
- if anything goes wrongpublic List<Map<String,Result<R>>> callSync(SaltClient client, Target<?> target, String username, String password, AuthModule authModule, Batch batch) throws SaltException
client
- SaltClient instancetarget
- the target for the functionusername
- username for authenticationpassword
- password for authenticationauthModule
- authentication module to usebatch
- the batch specificationSaltException
- if anything goes wrongpublic Map<String,Result<SSHResult<R>>> callSyncSSH(SaltClient client, SSHTarget<?> target, SaltSSHConfig cfg) throws SaltException
client
- SaltClient instancetarget
- the target for the functioncfg
- Salt SSH configuration objectSaltException
- if anything goes wrongCopyright © 2017. All rights reserved.