Examples of ScheduledTermination


Examples of com.elastisys.scale.cloudadapters.commons.termqueue.ScheduledTermination

        "cannot schedule termination for a "
            + "machine instance without launch time");

    DateTime terminationTime = calculateTerminationTime(victim,
        this.instanceHourMargin);
    return new ScheduledTermination(victim, terminationTime);
  }
View Full Code Here

Examples of com.elastisys.scale.cloudadapters.commons.termqueue.ScheduledTermination

    // to not yet incur cost). Terminate them immediately.
    Iterable<Machine> inRequestedState = filter(candidates,
        withState(REQUESTED));
    Iterator<Machine> requestedStateMachines = inRequestedState.iterator();
    while ((excessMachines > 0) && requestedStateMachines.hasNext()) {
      toTerminate.add(new ScheduledTermination(requestedStateMachines
          .next(), now()));
      excessMachines--;
    }

    // use victim selection policy to pick victims from any remaining
View Full Code Here

Examples of org.apache.muse.ws.resource.lifetime.ScheduledTermination

        // tries to apply the change immediately, rather than storing it
        // in a field and setting it during initialization)
        //
        if (resource.hasCapability(WsrlConstants.SCHEDULED_TERMINATION_URI))
        {
            ScheduledTermination wsrl =
                (ScheduledTermination)resource.getCapability(WsrlConstants.SCHEDULED_TERMINATION_URI);
            wsrl.setTerminationTime(termination);
        }
       
        return resource;
    }
View Full Code Here

Examples of org.apache.muse.ws.resource.lifetime.ScheduledTermination

               
        Date termination = null;
       
        if (resource.hasCapability(WsrlConstants.SCHEDULED_TERMINATION_URI))
        {
            ScheduledTermination wsrl =
                (ScheduledTermination)resource.getCapability(WsrlConstants.SCHEDULED_TERMINATION_URI);
            termination = wsrl.getTerminationTime();
        }
       
        WsResource entry = addEntry(epr, null, termination);
       
        //
View Full Code Here

Examples of org.apache.muse.ws.resource.lifetime.ScheduledTermination

        // tries to apply the change immediately, rather than storing it
        // in a field and setting it during initialization)
        //
        if (sub.hasCapability(WsrlConstants.SCHEDULED_TERMINATION_URI))
        {
            ScheduledTermination wsrl = (ScheduledTermination)sub.getCapability(WsrlConstants.SCHEDULED_TERMINATION_URI);
           
            try
            {
                wsrl.setTerminationTime(terminationTime);
            }
           
            catch (BaseFault error)
            {
                throw new UnacceptableInitialTerminationTimeFault(error);
View Full Code Here

Examples of org.apache.muse.ws.resource.lifetime.ScheduledTermination

        WsResource sub = (WsResource)result;
       
        //
        // add termination time to the response, if it exists
        //
        ScheduledTermination wsrl = (ScheduledTermination)sub.getCapability(WsrlConstants.SCHEDULED_TERMINATION_URI);
        Date time = null;
       
        if (wsrl != null)
            time = wsrl.getTerminationTime();
       
        SubscribeResponse response = new SubscribeResponse(sub, time);
        return response.toXML();
    }
View Full Code Here

Examples of org.apache.muse.ws.resource.lifetime.ScheduledTermination

        // tries to apply the change immediately, rather than storing it
        // in a field and setting it during initialization)
        //
        if (sub.hasCapability(WsrlConstants.SCHEDULED_TERMINATION_URI))
        {
            ScheduledTermination wsrl = (ScheduledTermination)sub.getCapability(WsrlConstants.SCHEDULED_TERMINATION_URI);
           
            try
            {
                wsrl.setTerminationTime(terminationTime);
            }
           
            catch (BaseFault error)
            {
                throw new UnacceptableInitialTerminationTimeFault(error);
View Full Code Here

Examples of org.apache.muse.ws.resource.lifetime.ScheduledTermination

        WsResource sub = (WsResource)result;
       
        //
        // add termination time to the response, if it exists
        //
        ScheduledTermination wsrl = (ScheduledTermination)sub.getCapability(WsrlConstants.SCHEDULED_TERMINATION_URI);
        Date time = null;
       
        if (wsrl != null)
            time = wsrl.getTerminationTime();
       
        SubscribeResponse response = new SubscribeResponse(sub, time);
        return response.toXML();
    }
View Full Code Here

Examples of org.apache.muse.ws.resource.lifetime.ScheduledTermination

        // tries to apply the change immediately, rather than storing it
        // in a field and setting it during initialization)
        //
        if (resource.hasCapability(WsrlConstants.SCHEDULED_TERMINATION_URI))
        {
            ScheduledTermination wsrl =
                (ScheduledTermination)resource.getCapability(WsrlConstants.SCHEDULED_TERMINATION_URI);
            wsrl.setTerminationTime(termination);
        }
       
        return resource;
    }
View Full Code Here

Examples of org.apache.muse.ws.resource.lifetime.ScheduledTermination

       
        Date termination = null;
       
        if (resource.hasCapability(WsrlConstants.SCHEDULED_TERMINATION_URI))
        {
            ScheduledTermination wsrl =
                (ScheduledTermination)resource.getCapability(WsrlConstants.SCHEDULED_TERMINATION_URI);
            termination = wsrl.getTerminationTime();
        }
       
        WsResource entry = addEntry(epr, null, termination);
       
        //
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.