| | |
| | | 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; |
| | |
| | | } |
| | | throw createDirectoryException(e); |
| | | } |
| | | catch (JebException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), |
| | | e.getMessageObject()); |
| | | } |
| | | finally |
| | | { |
| | | ec.sharedLock.unlock(); |
| | |
| | | */ |
| | | @Override() |
| | | public void addEntry(Entry entry, AddOperation addOperation) |
| | | throws DirectoryException |
| | | throws DirectoryException, CanceledOperationException |
| | | { |
| | | writerBegin(); |
| | | DN entryDN = entry.getDN(); |
| | |
| | | } |
| | | throw createDirectoryException(e); |
| | | } |
| | | catch (JebException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), |
| | | e.getMessageObject()); |
| | | } |
| | | finally |
| | | { |
| | | ec.sharedLock.unlock(); |
| | |
| | | */ |
| | | @Override() |
| | | public void deleteEntry(DN entryDN, DeleteOperation deleteOperation) |
| | | throws DirectoryException |
| | | throws DirectoryException, CanceledOperationException |
| | | { |
| | | writerBegin(); |
| | | |
| | |
| | | } |
| | | throw createDirectoryException(e); |
| | | } |
| | | catch (JebException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), |
| | | e.getMessageObject()); |
| | | } |
| | | finally |
| | | { |
| | | ec.sharedLock.unlock(); |
| | |
| | | */ |
| | | @Override() |
| | | public void replaceEntry(Entry entry, ModifyOperation modifyOperation) |
| | | throws DirectoryException |
| | | throws DirectoryException, CanceledOperationException |
| | | { |
| | | writerBegin(); |
| | | |
| | |
| | | } |
| | | throw createDirectoryException(e); |
| | | } |
| | | catch (JebException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), |
| | | e.getMessageObject()); |
| | | } |
| | | finally |
| | | { |
| | | ec.sharedLock.unlock(); |
| | |
| | | msg); |
| | | } |
| | | |
| | | Lock containerLock = currentContainer.sharedLock; |
| | | currentContainer.sharedLock.lock(); |
| | | try |
| | | { |
| | | containerLock.lock(); |
| | | |
| | | if(currentContainer.getNumSubordinates(currentDN, true) > |
| | | currentContainer.getSubtreeDeleteBatchSize()) |
| | | { |
| | | containerLock.unlock(); |
| | | containerLock = currentContainer.exclusiveLock; |
| | | containerLock.lock(); |
| | | } |
| | | |
| | | currentContainer.renameEntry(currentDN, entry, modifyDNOperation); |
| | | } |
| | | catch (DatabaseException e) |
| | |
| | | } |
| | | throw createDirectoryException(e); |
| | | } |
| | | catch (JebException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), |
| | | e.getMessageObject()); |
| | | } |
| | | finally |
| | | { |
| | | containerLock.unlock(); |
| | | currentContainer.sharedLock.unlock(); |
| | | writerEnd(); |
| | | } |
| | | } |
| | |
| | | */ |
| | | @Override() |
| | | public void search(SearchOperation searchOperation) |
| | | throws DirectoryException |
| | | throws DirectoryException, CanceledOperationException |
| | | { |
| | | readerBegin(); |
| | | |
| | |
| | | } |
| | | throw createDirectoryException(e); |
| | | } |
| | | catch (JebException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | Message message = ERR_JEB_DATABASE_EXCEPTION.get(e.getMessage()); |
| | | throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), |
| | | message); |
| | | } |
| | | finally |
| | | { |
| | | ec.sharedLock.unlock(); |