| | |
| | | /** |
| | | * The number of merge passes. |
| | | */ |
| | | int mergePassNumber = 1; |
| | | private int mergePassNumber = 1; |
| | | |
| | | |
| | | /** |
| | |
| | | startTime = System.currentTimeMillis(); |
| | | |
| | | // Create a temporary work directory. |
| | | File tempDir = getFileForPath(config.getImportTempDirectory()); |
| | | if(!tempDir.exists() && !tempDir.mkdir()) |
| | | File parentDir = getFileForPath(config.getImportTempDirectory()); |
| | | File tempDir = new File(parentDir, config.getBackendId()); |
| | | if(!tempDir.exists() && !tempDir.mkdirs()) |
| | | { |
| | | Message msg = ERR_JEB_IMPORT_CREATE_TMPDIR_ERROR.get( |
| | | String.valueOf(tempDir)); |
| | |
| | | * @throws DatabaseException If an error occurs in the JE database. |
| | | * @throws JebException If an error occurs in the JE backend. |
| | | */ |
| | | public void processEntry(ImportContext importContext, Entry entry) |
| | | private void processEntry(ImportContext importContext, Entry entry) |
| | | throws JebException, DatabaseException |
| | | { |
| | | DN entryDN = entry.getDN(); |
| | |
| | | |
| | | if (txn != null) |
| | | { |
| | | importContext.getEntryContainer().transactionCommit(txn); |
| | | EntryContainer.transactionCommit(txn); |
| | | txn = null; |
| | | } |
| | | } |
| | |
| | | { |
| | | if (txn != null) |
| | | { |
| | | importContext.getEntryContainer().transactionAbort(txn); |
| | | EntryContainer.transactionAbort(txn); |
| | | } |
| | | } |
| | | } |
| | |
| | | /** |
| | | * This class reports progress of the import job at fixed intervals. |
| | | */ |
| | | class ProgressTask extends TimerTask |
| | | private final class ProgressTask extends TimerTask |
| | | { |
| | | /** |
| | | * The number of entries that had been read at the time of the |