Class JSpaceState

java.lang.Object
com.j_spaces.core.JSpaceState
All Implemented Interfaces:
ISpaceState, Serializable

public class JSpaceState extends Object implements ISpaceState, Serializable
Copyright (c) 2010 GigaSpaces Technologies Ltd. All rights reserved The software source code is proprietary and confidential information of GigaSpaces. You may use the software source code solely under the terms and limitations of The license agreement granted to you by GigaSpaces.
See Also:
  • Constructor Details

    • JSpaceState

      public JSpaceState()
      Create a service state object
  • Method Details

    • convertToString

      public static String convertToString(Integer state)
    • getState

      public int getState()
      Get the current state of the service
      Returns:
      int - The state of the service
    • setState

      public void setState(int newState)
      Set the state of the service
      Parameters:
      newState - - The new state
    • verifyTransition

      public int verifyTransition(int newState)
      Verify the state transition, checking if the proposed new state is allowed from the current state. If the proposed state is not allowed an IllegalStateException will be thrown
      Parameters:
      newState - - The new state to check
      Throws:
      IllegalStateException - - If the proposed newState is not allowed
    • isTerminated

      public boolean isTerminated()
      Check if we're terminated completely, abort process is considered complete
      Returns:
      boolean - If the current state is ABORTED, return true
    • isAborted

      public boolean isAborted()
      Check if we're aborting or aborted
      Returns:
      boolean - If the current state is ABORTED or ABORTING, return true
    • isStopped

      public boolean isStopped()
    • isStarted

      public boolean isStarted()