Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

some javadoc

  • Loading branch information...
commit 5e1cb4bdda362d7c84d03af51048f538d768f07f 1 parent 1a8f3f8
@pauloricardomg pauloricardomg authored
View
2  service/service/java/source/src/org/globus/workspace/async/AsyncRequestManager.java
@@ -20,7 +20,7 @@
/**
* Interface that represents
- * a Spot Instances module
+ * an Asynchronous Request module
*/
public interface AsyncRequestManager extends AsyncRequestHome, PreemptableSpaceManager, StateChangeInterested {
View
10 service/service/java/source/src/org/globus/workspace/async/AsyncRequestManagerImpl.java
@@ -628,7 +628,7 @@ private void allocateEvenly(List<AsyncRequest> hungryRequests, Integer available
}
/**
- * Pre-empts equal bid requests more-or-less proportional
+ * Pre-empts requests more-or-less proportional
* to the number of allocations that the request currently has.
*
* NOTE: Each ACTIVE request must have at least one
@@ -790,7 +790,7 @@ protected void preempt(AsyncRequest request, int quantity) {
/**
* Trigger a status change after
* all VMs from a given request are finished
- * @param siRequest
+ * @param request
*/
private void allVMsFinished(AsyncRequest request){
if(!request.isPersistent() && (!request.needsMoreInstances() || currentPrice > request.getMaxBid())){
@@ -860,7 +860,7 @@ protected void allocate(AsyncRequest request, Integer quantity) {
}
/**
- * Changes the status of a Spot Instance request
+ * Changes the status of an asynchronous request
* @param request the request that will change status
* @param newStatus the new status
*/
@@ -873,12 +873,12 @@ private void changeStatus(AsyncRequest request, AsyncRequestStatus newStatus) {
}
// -------------------------------------------------------------------------
- // DEFINE SPOT INSTANCES CAPACITY
+ // DEFINE ASYNCHRONOUS REQUEST CAPACITY
// -------------------------------------------------------------------------
/**
* Calculates the maximum number of instances
- * the Spot Instances module can allocate
+ * the Asynchronous Request module can allocate
*
* The amount of memory available for SI and backfill
* requests will depend on the free reserved capacity
View
16 service/service/java/source/src/org/globus/workspace/creation/CreationManager.java
@@ -40,6 +40,22 @@
SchedulingException,
AuthorizationException;
+ /**
+ * An asynchronous create request is not satisfied at the same time
+ * it is submitted, but when the Asynchronous Request Manager
+ * decides to fulfill that request based on policies.
+ *
+ * Currently, asynchronous requests can be Spot Instance
+ * requests or backfill requests.
+ *
+ * @param req the asynchronous create request
+ * @param caller the owner of the request
+ * @return the added asynchronous request
+ * @throws CreationException
+ * @throws MetadataException
+ * @throws ResourceRequestDeniedException
+ * @throws SchedulingException
+ */
public AsyncRequest addAsyncRequest(AsyncCreateRequest req, Caller caller)
throws CreationException,
MetadataException,
View
24 service/service/java/source/src/org/globus/workspace/creation/InternalCreationManager.java
@@ -28,8 +28,32 @@
import org.nimbustools.api.services.rm.ResourceRequestDeniedException;
import org.nimbustools.api.services.rm.SchedulingException;
+/**
+ * This interface provides internal modules
+ * (such as the AsynchronousRequestManager) the
+ * ability to instantiate Virtual Machines
+ *
+ */
public interface InternalCreationManager {
+ /**
+ * Instantiates virtual machines with
+ * the given specification
+ * @param bindings the virtual machines' specs
+ * @param nics network interfaces
+ * @param caller owner of the VMs
+ * @param context the VM's context
+ * @param groupId the group id for this group of VMs
+ * @param coschedID the cosched id for this group of VMs
+ * @param spotInstances if the VMs are spot instances
+ * @return an array of created InstanceResources
+ * @throws CoSchedulingException
+ * @throws CreationException
+ * @throws MetadataException
+ * @throws ResourceRequestDeniedException
+ * @throws SchedulingException
+ * @throws AuthorizationException
+ */
public InstanceResource[] createVMs(VirtualMachine[] bindings,
NIC[] nics,
Caller caller,
View
29 service/service/java/source/src/org/globus/workspace/creation/defaults/CreationManagerImpl.java
@@ -269,6 +269,23 @@ public Advertised getAdvertised() {
return adv;
}
+
+ /**
+ * An asynchronous create request is not satisfied at the same time
+ * it is submitted, but when the Asynchronous Request Manager
+ * decides to fulfill that request based on policies.
+ *
+ * Currently, asynchronous requests can be Spot Instance
+ * requests or backfill requests.
+ *
+ * @param req the asynchronous create request
+ * @param caller the owner of the request
+ * @return the added asynchronous request
+ * @throws CreationException
+ * @throws MetadataException
+ * @throws ResourceRequestDeniedException
+ * @throws SchedulingException
+ */
public AsyncRequest addAsyncRequest(AsyncCreateRequest req, Caller caller)
throws CreationException,
MetadataException,
@@ -302,24 +319,24 @@ public AsyncRequest addAsyncRequest(AsyncCreateRequest req, Caller caller)
final String groupID = this.getGroupID(creatorID, bound.length);
- final String siID = generateRequestID();
+ final String reqiID = generateRequestID();
- AsyncRequest siRequest;
+ AsyncRequest asyncReq;
if(req instanceof SpotCreateRequest){
SpotCreateRequest spotReq = (SpotCreateRequest)req;
- siRequest = new AsyncRequest(siID, spotReq.getSpotPrice(), spotReq.isPersistent(),
+ asyncReq = new AsyncRequest(reqiID, spotReq.getSpotPrice(), spotReq.isPersistent(),
caller, groupID, bound, req.getContext(), req.getRequestedNics(),
req.getSshKeyName(), Calendar.getInstance());
} else {
- siRequest = new AsyncRequest(siID, caller, groupID, bound,
+ asyncReq = new AsyncRequest(reqiID, caller, groupID, bound,
req.getContext(), req.getRequestedNics(),
Calendar.getInstance());
}
- asyncManager.addRequest(siRequest);
+ asyncManager.addRequest(asyncReq);
- return siRequest;
+ return asyncReq;
}
public InstanceResource[] create(CreateRequest req, Caller caller)
Please sign in to comment.
Something went wrong with that request. Please try again.