Created
March 14, 2012 13:26
-
-
Save yaronp68/2036446 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public MachineDetails[] startManagementMachines(final long duration, final TimeUnit unit) | |
| throws TimeoutException, CloudProvisioningException { | |
| final String token = createAuthenticationToken(); | |
| final long endTime = calcEndTimeInMillis( | |
| duration, unit); | |
| final int numOfManagementMachines = cloud.getProvider().getNumberOfManagementMachines(); | |
| // thread pool - one per machine | |
| final ExecutorService executor = | |
| Executors.newFixedThreadPool(cloud.getProvider().getNumberOfManagementMachines()); | |
| try { | |
| return doStartManagement( | |
| endTime, token, numOfManagementMachines, executor); | |
| } finally { | |
| executor.shutdown(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment