public interface IWorker
We use a single thread pattern hence no issue of concurrency.
Modifier and Type | Method and Description |
---|---|
void |
addConfiguration(long offset,
org.thales.punch.libraries.shiva.api.Command command)
Refresh the configuration folder known to this worker.
|
org.thales.punch.settings.api.ISettingsMap |
asSettingsMap() |
String |
getWorkerId() |
void |
removeApplication(String appName)
Remove the folder of a stopped application
|
void |
tick()
Make the worker check its application.
|
void |
updateAssignement(org.thales.punch.settings.api.ISettingsMap assignments)
Update the assignments associated to a worker.
|
void updateAssignement(org.thales.punch.settings.api.ISettingsMap assignments)
assignments
- the refreshed assignmentsString getWorkerId()
void addConfiguration(long offset, org.thales.punch.libraries.shiva.api.Command command)
This allow each worker to store locally all the required application files and be ready to eventually execute it should the leader decide so.
offset
- the corresponding kafka offsetcommand
- the start commandvoid tick()
org.thales.punch.settings.api.ISettingsMap asSettingsMap()
void removeApplication(String appName)
appName
- Copyright © 2022. All rights reserved.