Package org.jboss.as.server.suspend
Interface ServerActivity
-
- All Superinterfaces:
SuspendableActivity
@Deprecated(forRemoval=true, since="26.0.0") public interface ServerActivity extends SuspendableActivity
Deprecated, for removal: This API element is subject to removal in a future version.UseSuspendableActivityinstead.A server activity that may have to finish before the server can shut down gracefully.- Author:
- Stuart Douglas
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_EXECUTION_GROUPDeprecated, for removal: This API element is subject to removal in a future version.The default value returned fromgetExecutionGroup().static intHIGHEST_EXECUTION_GROUPDeprecated, for removal: This API element is subject to removal in a future version.The highest valid value to return fromgetExecutionGroup().static intLOWEST_EXECUTION_GROUPDeprecated, for removal: This API element is subject to removal in a future version.The lowest valid value to return fromgetExecutionGroup().-
Fields inherited from interface org.jboss.as.server.suspend.SuspendableActivity
COMPLETED
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default intgetExecutionGroup()Deprecated, for removal: This API element is subject to removal in a future version.Returns a value that indicates to which set ofServerActivityinstancesregisteredwith theServerActivityRegistrythis activity should belong.default CompletionStage<Void>prepare(ServerSuspendContext context)Deprecated, for removal: This API element is subject to removal in a future version.Returns a prepare stage to complete prior to server suspension.voidpreSuspend(ServerActivityCallback listener)Deprecated, for removal: This API element is subject to removal in a future version.Invoked before the server is paused.voidresume()Deprecated, for removal: This API element is subject to removal in a future version.Invoked if the suspend or pre-suspend is cancelled or if a suspended server is resumed.default CompletionStage<Void>resume(ServerResumeContext context)Deprecated, for removal: This API element is subject to removal in a future version.Returns a resume stage to complete upon resuming a suspended server.default CompletionStage<Void>suspend(ServerSuspendContext context)Deprecated, for removal: This API element is subject to removal in a future version.Returns a suspend stage to complete upon server suspension.voidsuspended(ServerActivityCallback listener)Deprecated, for removal: This API element is subject to removal in a future version.Invoked once the suspend process has started.
-
-
-
Field Detail
-
LOWEST_EXECUTION_GROUP
static final int LOWEST_EXECUTION_GROUP
Deprecated, for removal: This API element is subject to removal in a future version.The lowest valid value to return fromgetExecutionGroup().
-
DEFAULT_EXECUTION_GROUP
static final int DEFAULT_EXECUTION_GROUP
Deprecated, for removal: This API element is subject to removal in a future version.The default value returned fromgetExecutionGroup(). Implementations should use this unless there is a clear reason to use a different value.
-
HIGHEST_EXECUTION_GROUP
static final int HIGHEST_EXECUTION_GROUP
Deprecated, for removal: This API element is subject to removal in a future version.The highest valid value to return fromgetExecutionGroup().
-
-
Method Detail
-
getExecutionGroup
default int getExecutionGroup()
Deprecated, for removal: This API element is subject to removal in a future version.Returns a value that indicates to which set ofServerActivityinstancesregisteredwith theServerActivityRegistrythis activity should belong. AllServerActivityinstances with the same execution group value have theirpreSuspend,suspendedandresumemethods invoked separately from activities with different execution group values.The order in which execution groups will be processed depends on the method being invoked:
- For
preSuspendandsuspended, groups with a lower value are processed before those with a higher value. - For
resume, groups with a higher value are processed before those with a lower value.
There is no guarantee of any ordering of method invocation between activities in the same execution group, and they may even be processed concurrently.
Note that
preSuspendis invoked for all activity instances before the overall suspend process proceeds to calls tosuspended. The unit of grouping is the individual method invocations, not the overall preSuspend/suspended process.The default implementation of this method returns
DEFAULT_EXECUTION_GROUP.- Returns:
- a value between
LOWEST_EXECUTION_GROUPandHIGHEST_EXECUTION_GROUP, inclusive.
- For
-
preSuspend
void preSuspend(ServerActivityCallback listener)
Deprecated, for removal: This API element is subject to removal in a future version.Invoked before the server is paused. This is the place where pause notifications should be sent to external systems such as load balancers to tell them this node is about to go away.- Parameters:
listener- The listener to invoker when the pre-pause phase is done
-
suspended
void suspended(ServerActivityCallback listener)
Deprecated, for removal: This API element is subject to removal in a future version.Invoked once the suspend process has started. One this has been invoked no new requests should be allowed to proceeed- Parameters:
listener- The listener to invoke when suspend is done.
-
resume
void resume()
Deprecated, for removal: This API element is subject to removal in a future version.Invoked if the suspend or pre-suspend is cancelled or if a suspended server is resumed.
-
prepare
default CompletionStage<Void> prepare(ServerSuspendContext context)
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:SuspendableActivityReturns a prepare stage to complete prior to server suspension. Default implementation returns a completed stage.- Specified by:
preparein interfaceSuspendableActivity- Parameters:
context- the server suspend context- Returns:
- a prepare stage to complete prior to server suspension.
-
suspend
default CompletionStage<Void> suspend(ServerSuspendContext context)
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:SuspendableActivityReturns a suspend stage to complete upon server suspension.- Specified by:
suspendin interfaceSuspendableActivity- Parameters:
context- the server suspend context- Returns:
- a suspend stage to complete upon server suspension.
-
resume
default CompletionStage<Void> resume(ServerResumeContext context)
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:SuspendableActivityReturns a resume stage to complete upon resuming a suspended server.- Specified by:
resumein interfaceSuspendableActivity- Parameters:
context- the server resume context- Returns:
- a resume stage to complete upon resuming a suspended server.
-
-