Package dev.getelements.elements.rt
Interface ResourceService.ResourceAcquisition
- All Superinterfaces:
AutoCloseable
- Enclosing interface:
ResourceService
Acquires a
Resource
, guaranteeing it will stay in memory until this object is closed. This does not
provide access to the Resource
. Use a ResourceService.ResourceTransaction
for that purpose to guarantee
synchronized access to the resource.-
Method Summary
Modifier and TypeMethodDescriptionbegin()
Creates a newResourceService.ResourceTransaction
from this acquisition.void
close()
Closes the transactionGets theResourceId
.
-
Method Details
-
getResourceId
ResourceId getResourceId()Gets theResourceId
.- Returns:
- the
ResourceId
-
close
void close()Closes the transaction- Specified by:
close
in interfaceAutoCloseable
-
begin
Creates a newResourceService.ResourceTransaction
from this acquisition.- Returns:
- the
ResourceService.ResourceTransaction
-