Package com.epam.reportportal.service
Interface LaunchIdLock
-
- All Known Implementing Classes:
AbstractLaunchIdLock,LaunchIdLockFile,LaunchIdLockSocket
public interface LaunchIdLockA service to perform blocking operation to get single launch UUID for multiple clients.
-
-
Field Summary
Fields Modifier and Type Field Description static floatMAX_WAIT_TIME_DISCREPANCY
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidfinishInstanceUuid(java.lang.String instanceUuid)Remove self UUID from a lock, means that a Client finished its Launch.default java.util.Collection<java.lang.String>getLiveInstanceUuids()Return all instance UUIDs which are still running.java.lang.StringobtainLaunchUuid(java.lang.String instanceUuid)Returns a Launch UUID for many clients.voidupdateInstanceUuid(java.lang.String instanceUuid)Update self UUID in a lock, means that the Client still executing its Launch.
-
-
-
Field Detail
-
MAX_WAIT_TIME_DISCREPANCY
static final float MAX_WAIT_TIME_DISCREPANCY
- See Also:
- Constant Field Values
-
-
Method Detail
-
obtainLaunchUuid
@Nullable java.lang.String obtainLaunchUuid(@Nonnull java.lang.String instanceUuid)Returns a Launch UUID for many clients.- Parameters:
instanceUuid- a Client instance UUID, which will be used to identify a Client and a Launch. If it the first one UUID passed to the method it will be returned to every other client instance.- Returns:
- either instanceUuid, if the process managed obtain the lock and become the primary Launch, either the primary Launch UUID, or null in case of execution errors
-
updateInstanceUuid
void updateInstanceUuid(@Nonnull java.lang.String instanceUuid)Update self UUID in a lock, means that the Client still executing its Launch.- Parameters:
instanceUuid- instanceUuid a Client instance UUID
-
finishInstanceUuid
void finishInstanceUuid(@Nonnull java.lang.String instanceUuid)Remove self UUID from a lock, means that a Client finished its Launch.- Parameters:
instanceUuid- a Client instance UUID
-
getLiveInstanceUuids
@Nonnull default java.util.Collection<java.lang.String> getLiveInstanceUuids()
Return all instance UUIDs which are still running.- Returns:
- a collection of live instance UUIDs
-
-