Package gda.rcp.views

Class ReservedControl

java.lang.Object
gda.rcp.views.ReservedControl
All Implemented Interfaces:
ReservableControl

public final class ReservedControl extends Object implements ReservableControl
  • Constructor Details

    • ReservedControl

      public ReservedControl()
  • Method Details

    • reserve

      public boolean reserve(Object owner)
      Description copied from interface: ReservableControl
      Reserves the instance, setting the requesting object as owner. The operation fails if the instance is already reserved by another object or the requesting object is null
      Specified by:
      reserve in interface ReservableControl
      Parameters:
      owner - the class requesting to reserve the resource
      Returns:
      true if the operation succeeded, false otherwise
    • release

      public boolean release(Object owner)
      Description copied from interface: ReservableControl
      Release the instance. The operation fails if the requesting object is not the actual owner or the requesting object is null
      Specified by:
      release in interface ReservableControl
      Parameters:
      owner - the class requesting to release the resource
      Returns:
      true if the operation succeeded, false otherwise
    • isReserved

      public boolean isReserved()
      Description copied from interface: ReservableControl
      Verify if this instance is actually reserved.
      Specified by:
      isReserved in interface ReservableControl
      Returns:
      true if reserved, false otherwise
    • isOwner

      public boolean isOwner(Object owner)
      Description copied from interface: ReservableControl
      Verify if an object is the actual owner.
      Specified by:
      isOwner in interface ReservableControl
      Parameters:
      owner - the class requesting the validation
      Returns:
      true if the requesting object is the same as the actual owner, false otherwise