| | |
| | | import java.io.IOException; |
| | | import java.io.File; |
| | | import java.util.concurrent.atomic.AtomicInteger; |
| | | import java.util.concurrent.locks.Lock; |
| | | |
| | | import java.io.FileInputStream; |
| | | import java.io.FilenameFilter; |
| | |
| | | { |
| | | EnvironmentConfig envConfig = |
| | | ConfigurableEnvironment.parseConfigEntry(cfg); |
| | | |
| | | envConfig.setLockTimeout(0); |
| | | rootContainer = initializeRootContainer(envConfig); |
| | | } |
| | | |
| | |
| | | throw new DirectoryException(ResultCode.UNWILLING_TO_PERFORM, |
| | | msg); |
| | | } |
| | | |
| | | Lock containerLock = currentContainer.sharedLock; |
| | | try |
| | | { |
| | | currentContainer.sharedLock.lock(); |
| | | containerLock.lock(); |
| | | |
| | | if(currentContainer.getNumSubordinates(currentDN, true) > |
| | | currentContainer.getSubtreeDeleteBatchSize()) |
| | | { |
| | | containerLock.unlock(); |
| | | containerLock = currentContainer.exclusiveLock; |
| | | containerLock.lock(); |
| | | } |
| | | |
| | | currentContainer.renameEntry(currentDN, entry, modifyDNOperation); |
| | | } |
| | |
| | | } |
| | | finally |
| | | { |
| | | currentContainer.sharedLock.unlock(); |
| | | containerLock.unlock(); |
| | | writerEnd(); |
| | | } |
| | | } |