Package gda.rcp.views
Class ReservedControl
java.lang.Object
gda.rcp.views.ReservedControl
- All Implemented Interfaces:
ReservableControl
Implements
ReservableControl-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanVerify if an object is the actual owner.booleanVerify if this instance is actually reserved.booleanRelease the instance.booleanReserves the instance, setting the requesting object as owner.
-
Constructor Details
-
ReservedControl
public ReservedControl()
-
-
Method Details
-
reserve
Description copied from interface:ReservableControlReserves the instance, setting the requesting object as owner. The operation fails if the instance is already reserved by another object or the requesting object isnull- Specified by:
reservein interfaceReservableControl- Parameters:
owner- the class requesting to reserve the resource- Returns:
trueif the operation succeeded,falseotherwise
-
release
Description copied from interface:ReservableControlRelease the instance. The operation fails if the requesting object is not the actual owner or the requesting object isnull- Specified by:
releasein interfaceReservableControl- Parameters:
owner- the class requesting to release the resource- Returns:
trueif the operation succeeded,falseotherwise
-
isReserved
public boolean isReserved()Description copied from interface:ReservableControlVerify if this instance is actually reserved.- Specified by:
isReservedin interfaceReservableControl- Returns:
trueif reserved,falseotherwise
-
isOwner
Description copied from interface:ReservableControlVerify if an object is the actual owner.- Specified by:
isOwnerin interfaceReservableControl- Parameters:
owner- the class requesting the validation- Returns:
trueif the requesting object is the same as the actual owner,falseotherwise
-