@PublicAPI public interface SignalApi extends Serializable
org.ow2.proactive.scheduler.synchronization
Modifier and Type | Method and Description |
---|---|
Map<String,Map<String,String>> |
checkForSignals(Set<String> signalsSubSet)
Check if all of the signals given as input exist among the set of job signals
|
void |
clearJobSignals()
Remove the entry corresponding to job signals from the signals channel
|
Map<String,Signal> |
getJobSignals()
Return the set of job signals
|
boolean |
isReceived(String signalName)
Check if the given signal was received
|
void |
readyForSignal(String signalName)
Add a new signal to the set of job signals
|
void |
readyForSignal(String signalName,
List<JobVariable> variables)
Add a new signal to the set of job signals
|
void |
removeManySignals(Set<String> signalsSubSet)
Remove the given set of signals from job signals
In order to remove signals that were not yet received, the signalsSubSet parameter should contain the "ready_" prefix and the signal names
|
void |
removeSignal(String signal)
Remove the given
signal from the set of job signals
In order to remove a signal that was not yet received, the signalsSubSet parameter should contain the "ready_" prefix and the signal name |
void |
sendManySignals(Map<String,Map<String,String>> signalParameters)
Add the given set of signals to job signals
|
void |
sendManySignals(Set<String> signalsSubSet)
Add the given set of signals to job signals
|
void |
sendSignal(String signalName)
Add the given
signal to the set of job signals |
void |
sendSignal(String signalName,
Map<String,String> parameters)
Add the given
signal to the set of job signals |
Map<String,String> |
waitFor(String signalName)
Wait until the given signal is added to the set of job signals
|
Map<String,Map<String,String>> |
waitForAll(Set<String> signalsSubSet)
Wait until all the input signals are added to the set of job signals
|
Signal |
waitForAny(Set<String> signalsSubSet)
Wait until one signal (among those of the given
signalsSubSet ) is added to the set of job signals |
void readyForSignal(String signalName) throws SignalApiException
signalName
- name of the signal to be addedSignalApiException
- if an error occurred while reading in the signals channel, or when adding the ready signal to job signalsvoid readyForSignal(String signalName, List<JobVariable> variables) throws SignalApiException
signalName
- name of the signal to be addedvariables
- the input variables of the signal to be addedSignalApiException
- if an error occurred while reading in the signals channel, or when adding the ready signal to job signalsboolean isReceived(String signalName) throws SignalApiException
signalName
- name of the signal to be checkedSignalApiException
- if an error occurred while reading in the signals channelMap<String,Map<String,String>> checkForSignals(Set<String> signalsSubSet) throws SignalApiException
signalsSubSet
- set of the signals to be checkedSignalApiException
- if an error occurred while reading in the signals channelMap<String,String> waitFor(String signalName) throws SignalApiException
signalName
- name of the signal to wait forSignalApiException
- if an error occurred while reading in the signals channelSignal waitForAny(Set<String> signalsSubSet) throws SignalApiException
signalsSubSet
) is added to the set of job signalssignalsSubSet
- set of the signals to wait for any of themSignalApiException
- if an error occurred while reading in the signals channelMap<String,Map<String,String>> waitForAll(Set<String> signalsSubSet) throws SignalApiException
signalsSubSet
- set of the signals to wait forSignalApiException
- if an error occurred while reading in the signals channelvoid sendSignal(String signalName) throws SignalApiException
signal
to the set of job signalssignalName
- name of the signal to be added to job signalsSignalApiException
- if the corresponding ready signal does not exist, or when an error occurs while sending the signalvoid sendSignal(String signalName, Map<String,String> parameters) throws SignalApiException
signal
to the set of job signalssignalName
- name of the signal to be added to job signalsparameters
- the updated values of the signal to be addedSignalApiException
- if the corresponding ready signal does not exist, or when an error occurs while sending the signalvoid sendManySignals(Set<String> signalsSubSet) throws SignalApiException
signalsSubSet
- set of the signals to be added to job signalsSignalApiException
- if an error occurred while reading in the signals channel, or when adding the signals to job signalsvoid sendManySignals(Map<String,Map<String,String>> signalParameters) throws SignalApiException
signalParameters
- a map containing the signal name and the updated values of the signalSignalApiException
- if an error occurred while reading in the signals channel, or when adding the signals to job signalsvoid removeSignal(String signal) throws SignalApiException
signal
from the set of job signals
In order to remove a signal that was not yet received, the signalsSubSet parameter should contain the "ready_" prefix and the signal namesignal
- name of the signal to be removed from job signalsSignalApiException
- if an error occurred while reading in the signals channel, or when removing the signal from job signalsvoid removeManySignals(Set<String> signalsSubSet) throws SignalApiException
signalsSubSet
- set of the signals to be removed from job signalsSignalApiException
- if an error occurred while reading in the signals channel, or when removing the signals from job signalsMap<String,Signal> getJobSignals() throws SignalApiException
SignalApiException
- if an error occurred while reading in the signals channelvoid clearJobSignals() throws SignalApiException
SignalApiException
- if an error occurred while reading in the signals channel, or when removing an entry from this channel