Generation createGeneration() throws BundleException { synchronized (this.infoMonitor) { if (generationLocks == null) { generationLocks = new LockSet<>(); } boolean lockedID; try { lockedID = generationLocks.tryLock(nextGenerationId, 5, TimeUnit.SECONDS); } catch (InterruptedException e) { Thread.currentThread().interrupt(); throw new BundleException("Failed to obtain id locks for generation.", BundleException.STATECHANGE_ERROR, e); //$NON-NLS-1$ } if (!lockedID) { throw new BundleException("Failed to obtain id locks for generation.", BundleException.STATECHANGE_ERROR); //$NON-NLS-1$ } Generation newGeneration = new Generation(nextGenerationId++); return newGeneration; } }
Generation createGeneration() throws BundleException { synchronized (this.infoMonitor) { if (generationLocks == null) { generationLocks = new LockSet<Long>(); } boolean lockedID; try { lockedID = generationLocks.tryLock(nextGenerationId, 5, TimeUnit.SECONDS); } catch (InterruptedException e) { Thread.currentThread().interrupt(); throw new BundleException("Failed to obtain id locks for generation.", BundleException.STATECHANGE_ERROR, e); //$NON-NLS-1$ } if (!lockedID) { throw new BundleException("Failed to obtain id locks for generation.", BundleException.STATECHANGE_ERROR); //$NON-NLS-1$ } Generation newGeneration = new Generation(nextGenerationId++); return newGeneration; } }
Generation createGeneration() throws BundleException { synchronized (this.infoMonitor) { if (generationLocks == null) { generationLocks = new LockSet<Long>(); } boolean lockedID; try { lockedID = generationLocks.tryLock(nextGenerationId, 5, TimeUnit.SECONDS); } catch (InterruptedException e) { Thread.currentThread().interrupt(); throw new BundleException("Failed to obtain id locks for generation.", BundleException.STATECHANGE_ERROR, e); //$NON-NLS-1$ } if (!lockedID) { throw new BundleException("Failed to obtain id locks for generation.", BundleException.STATECHANGE_ERROR); //$NON-NLS-1$ } Generation newGeneration = new Generation(nextGenerationId++); return newGeneration; } }
Generation createGeneration() throws BundleException { synchronized (this.infoMonitor) { if (generationLocks == null) { generationLocks = new LockSet<Long>(); } boolean lockedID; try { lockedID = generationLocks.tryLock(nextGenerationId, 5, TimeUnit.SECONDS); } catch (InterruptedException e) { Thread.currentThread().interrupt(); throw new BundleException("Failed to obtain id locks for generation.", BundleException.STATECHANGE_ERROR, e); //$NON-NLS-1$ } if (!lockedID) { throw new BundleException("Failed to obtain id locks for generation.", BundleException.STATECHANGE_ERROR); //$NON-NLS-1$ } Generation newGeneration = new Generation(nextGenerationId++); return newGeneration; } }
Generation createGeneration() throws BundleException { synchronized (this.infoMonitor) { if (generationLocks == null) { generationLocks = new LockSet<Long>(); } boolean lockedID; try { lockedID = generationLocks.tryLock(nextGenerationId, 5, TimeUnit.SECONDS); } catch (InterruptedException e) { Thread.currentThread().interrupt(); throw new BundleException("Failed to obtain id locks for generation.", BundleException.STATECHANGE_ERROR, e); //$NON-NLS-1$ } if (!lockedID) { throw new BundleException("Failed to obtain id locks for generation.", BundleException.STATECHANGE_ERROR); //$NON-NLS-1$ } Generation newGeneration = new Generation(nextGenerationId++); return newGeneration; } }
Generation createGeneration() throws BundleException { synchronized (this.infoMonitor) { if (generationLocks == null) { generationLocks = new LockSet<>(); } boolean lockedID; try { lockedID = generationLocks.tryLock(nextGenerationId, 5, TimeUnit.SECONDS); } catch (InterruptedException e) { Thread.currentThread().interrupt(); throw new BundleException("Failed to obtain id locks for generation.", BundleException.STATECHANGE_ERROR, e); //$NON-NLS-1$ } if (!lockedID) { throw new BundleException("Failed to obtain id locks for generation.", BundleException.STATECHANGE_ERROR); //$NON-NLS-1$ } Generation newGeneration = new Generation(nextGenerationId++); return newGeneration; } }