30 Aug, 2013
3 commits
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@9479 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Renamed: - ReplicationIterator to ReplicationDBCursor - ReplicationIteratorComparator to ReplicationDBCursorComparator - JEReplicationIterator to JEReplicationDBCursor Fixed javadocs, variable names, method names, etc. ReplicationServerDomain.java: Renamed getChangelogIterator() to getCursorFrom(). DbHandler.java: Renamed generateIterator() to generateCursorFrom(). MessageHandler.java: Extracted nextOldestUpdateMsg() and findOldestChangeNumberFromReplicationDBs() to increase code expressiveness. git-svn-id: https://svn.forgerock.org/opendj/trunk@9478 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Added compareToEquivalentToEquals(), hashCodesEqualWhenChangeNumbersEqual(), hashCodesEqualWhenCompareToEqual() to verify basic properties are covered. Code cleanup. git-svn-id: https://svn.forgerock.org/opendj/trunk@9477 41b1ffd8-f28e-4786-ab96-9950f0a78031
29 Aug, 2013
8 commits
-
* avoid accidentally trapping Errors - only RuntimeExceptions should be caught. Thanks to Peter for pointing this out :-) git-svn-id: https://svn.forgerock.org/opendj/trunk@9476 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
* implement event notification framework * TODO: need to figure out how to expose it in public API. git-svn-id: https://svn.forgerock.org/opendj/trunk@9475 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
* save last failure and include it as exception cause when all factories have failed. git-svn-id: https://svn.forgerock.org/opendj/trunk@9474 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
* make ConnectionEntryReader non-final. git-svn-id: https://svn.forgerock.org/opendj/trunk@9472 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@9471 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
ReplicationServerDomain.java: Renamed getMessage() to debug() + called TRACER.debugInfo() in it. MessageHandler.java: Implemented toString(). git-svn-id: https://svn.forgerock.org/opendj/trunk@9470 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Renamed: - field stateDb to changelogStateDb. - start() to initializeFromChangelogStateDB(). - putInStateDBIfNotExist() to putInChangelogStateDBIfNotExist() - deleteFromStateDB() to deleteFromChangelogStateDB() + changed the signature. In getOrAddDb(), reduced code clutter and removed useless comments. Extracted methods kb(), mb(), toBytes(), buildGenIdKey(), buildServerIdKey(), buildGenIdData() for better readability. Extracted method debug() to reduce code clutter. Used static imports. ReplicationServer.java: Consequence of the rename of ReplicationDbEnv.start(). git-svn-id: https://svn.forgerock.org/opendj/trunk@9469 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
CR-2231. Thanks Matt git-svn-id: https://svn.forgerock.org/opendj/trunk@9468 41b1ffd8-f28e-4786-ab96-9950f0a78031
28 Aug, 2013
3 commits
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@9467 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
…nxxxx.conf instead of loginxxxxconf git-svn-id: https://svn.forgerock.org/opendj/trunk@9466 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@9465 41b1ffd8-f28e-4786-ab96-9950f0a78031
27 Aug, 2013
5 commits
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@9464 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Extended the use of the getMessage() method to streamline debug message and reduce clutter when reading the code. git-svn-id: https://svn.forgerock.org/opendj/trunk@9463 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
ReplicationDbEnv.java: Decoupled the call to start() from building the object + Made start() a public method. Inlined the code from readDomainBaseDNGenerationIDRecords() and readServerIdDomainBaseDNRecords() into start() to avoid reading twice the DB on startup. Extracted method openDatabase(). ReplicationServer.java: In initialize(), called ReplicationDbEnv.start(). git-svn-id: https://svn.forgerock.org/opendj/trunk@9462 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Removed parameters obscuring the code. ReplicationServerDomain.java: Renamed getServers() to getServerIds(). MessageHandler.java: In getDomain(), removed createIfNotExist which was always true in calling code + called ReplicationServer.waitConnections() here. In getRcvMsgQueueSize(), used early exit. ReplicationServer.java: In getReplicationServerDomain() methods, removed the create parameter. Also extracted the waitConnections() method and called it higher up in the call hierarchy. Created initDomainGenerationID() and addServerIdToDomain() methods here from code in ReplicationDbEnv.java In runConnect(), collapsed if statements. *.java Consequence of the changes to: - ReplicationServerDomain.getServers() - ReplicationServer.getReplicationServerDomain() - ReplicationServer.initDomainGenerationID() and addServerIdToDomain() GenerationIdTest.java: Extracted method isDegradedDueToGenerationId(). InitOnLineTest.java: Extracted method getConnectedDSServerIds(). git-svn-id: https://svn.forgerock.org/opendj/trunk@9461 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Assigned serverIdToChangeNumber field in the declaration. In reload(), called update(). In cover(ServerState), cover(ChangeNumber). In duplicate(), called Map.putAll(). DraftCNDbHandler.java: In clear(String), removed useless code. ExternalChangeLogTest.java: Renamed createDomain() to startNewDomain(). In initializeTestBackend(), removed one parameter. Renamed removeTestBackend2() to removeTestBackend() + Removed useless null checks around the calls to it. git-svn-id: https://svn.forgerock.org/opendj/trunk@9460 41b1ffd8-f28e-4786-ab96-9950f0a78031
26 Aug, 2013
6 commits
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@9459 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Also made the code more explicit. DraftCNBDHandler.java, ChangelogDB.java: Renamed firstkey and lastkey to firstDraftCN and lastDraftCN + renamed getters too. In clear() added very a important comment about unreliable method call + renamed currentkey local variable to currentDraftCN + used final keyword. ECLServerHandler.java: Renamed all the *Key local variables to *DraftCN where possible. ReplicationServer.java: Renamed field replicationServers to replicationServerUrls. Changed excludedBaseDNs from Collection to Set. Did some renaming here and there. Extracted method contains(). In getECLDraftCNLimits(), used primitive variables. There was some code that worked by chance more than by design: see in the old code "if (newestDate == 0L)" DraftCNDbHandlerTest.java: Renamed firstkey to firstDraftCN. git-svn-id: https://svn.forgerock.org/opendj/trunk@9458 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@9457 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@9456 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Introduced interfaces ChangelogDB and ChangelogDBIterator to remove direct dependencies to org.opends.server.replication.server.changelog.je . The interfaces remain similar to the old classes DraftCNDbHandler and DraftCNDbIterator, but: - I plan to introduce more changes to rework a bit these interfaces - They reduce the number of accessible methods for client code ChangelogDB.java: ADDED Renamed getValue() to getPreviousCookie(). ChangelogDBIterator.java: ADDED Renamed releaseCursor() to close(). *.java: Consequence of the use of the new interfaces. Renamed instance variables, local variables and method parameters to accommodate the new classes. Also renamed variables and methods to better explicit their role. Also reworked javadocs and comments. ReplicationServer.java: Extracted method contains(). In getEligibleCN(), reworked the code to avoid computing debug information if debug is off. Renamed local variables. Removed useless comments. DraftCNDB.java: Removed unused instance member ReplicationServer. DraftCNDbHandler.java: Now implements ChangelogDB. Consequence of change to DraftCNDB. Extracted method debugException(). Removed releaseReadCursor() (Replaced by StaticUtils.close()). DraftCNDbIterator.java: Now implements ChangelogDBIterator. TestCaseUtils.java: In deleteDirectory(), added a null check and an exists check. DbHandlerTest.java, DraftCNDbHandlerTest.java: Extracted method createCleanDir(). Removed now useless checks before calling TestCaseUtils.deleteDirectory(). Called StaticUtils.close(). Extracted method assertIteratorReadsInOrder(). git-svn-id: https://svn.forgerock.org/opendj/trunk@9455 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@9454 41b1ffd8-f28e-4786-ab96-9950f0a78031
23 Aug, 2013
5 commits
-
Removed test on number of entries returned: Eclipse gives me 33, command line run gives me 34, while Jenkins run gives me 32!!! What a deterministic test! git-svn-id: https://svn.forgerock.org/opendj/trunk@9453 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Fixed a bug introduced in r9449. ReplicationServerTest.java: Extracted several methods to simplify this test. git-svn-id: https://svn.forgerock.org/opendj/trunk@9452 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@9451 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Side effect of renaming a constant, the ReplicationCliMain was touched, and I run more cleanup on it. git-svn-id: https://svn.forgerock.org/opendj/trunk@9450 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
ReplicationBackend.java: Removed useless setBaseDNs(). In exportRootChanges(), used Collections.singletonList() + Rearranged the code to make it more explicit and reduce duplication. Renamed processContainer() to writeChangesAfterChangeNumber() + changed signature. Renamed processChange() to writeChange() + changed signature + removed calling Operation.setInternalOperation(). Extracted methods extractChangeNumber(), canContinue(), addAttribute(), createBackupManager(), getBackendDir(). git-svn-id: https://svn.forgerock.org/opendj/trunk@9449 41b1ffd8-f28e-4786-ab96-9950f0a78031
22 Aug, 2013
10 commits
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@9448 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
- Changelog added git-svn-id: https://svn.forgerock.org/opendj/trunk@9447 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Renamed releaseCursor() to close(). Now extends Closeable. *.java: Consequence of the change to ReplicationIterator. MessageHandler.java: Removed releaseAllIterators() in favour of StaticUtils.close(). ReplicationBackend.java: In getEntry(), used early exit. Used StaticUtils.close(). Removed useless comments / code. Used interfaces rather than concrete classes. Extracted methods computeDN() and writeChangeRecord(). ReplicationServerDomain.java: Removed sleep() replaced with StaticUtils.sleep(). StaticUtils.java: Made close(Collection) more generic + now log exceptions happening when closing. git-svn-id: https://svn.forgerock.org/opendj/trunk@9446 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
…e jars nor the ant task. Building directly with xjc is preferred and this also makes the war file lighter. git-svn-id: https://svn.forgerock.org/opendj/trunk@9445 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@9444 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Fixed broken early exit. ServerHandler.java: Collapsed comments on one less lines. git-svn-id: https://svn.forgerock.org/opendj/trunk@9443 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Removed useless duplicated javadocs for getMonitorData. ServerHandler.java: Extracted method releaseDomainLock(). Replaced lockDomain(boolean) with lockDomainNoTimeout() and lockDomainWithTimeout(). Removed duplicate code from MessageHandler. Moved shuttingDown() to ServerHandler. DataServerHandler.java, ECLServerHandler.java: Consequence of the change to ServerHandler. MessageHandler.java: Moved shuttingDown() here from ServerHandler. ReplicationServerHandler.java Consequence of the change to ServerHandler. In checkGenerationId(), used early exit. Extracted method clearRemoteLSHandlers(). In processTopoInfoFromRS(), inlined local variables. In hasRemoteLDAPServers() and getConnectedDirectoryServerIds(), removed useless and misleading synchronized blocks. git-svn-id: https://svn.forgerock.org/opendj/trunk@9442 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Removed unused file git-svn-id: https://svn.forgerock.org/opendj/trunk@9441 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
- Original data are copied under build/deb/ folder as the process to build the deb package implies to modify the source. - Opendj init script has been modified. Indeed, under debian OS (and others) the /var/run/ folder is deleted at reboot, deleting by the same way our pid file, making the service wobbly. - As linux distro use the same opendj file, a new folder was created under resource to store the shared file between them. - At last, modified post/prem/specFile as well as the fact to create a symlink on an existing one throws an error. (same when you try to remove one from no-existing) git-svn-id: https://svn.forgerock.org/opendj/trunk@9440 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Code cleanup. MonitoringPublisher.java: Removed one call to a setter. ReplicationDomainMonitor.java: Renamed computeDomainMonitorData() to recomputeMonitorData(). ReplicationServerDomain.java: Renamed replyWithMonitorMsg() to replyWithTopologyMonitorMsg(). ReplicationDomainTest.java: Extracted methods createReplicationServer(), assertExpectedServerStatuses(), disable(), remove(). Replaced assertTrue() with assertEquals(). git-svn-id: https://svn.forgerock.org/opendj/trunk@9439 41b1ffd8-f28e-4786-ab96-9950f0a78031