Skip to content

Commit 20da26f

Browse files
committed
fix: enhance javadoc
1 parent 00cfcfa commit 20da26f

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

community/flamingock-auditstore-mongodb-sync/src/main/java/io/flamingock/community/mongodb/sync/driver/MongoDBSyncAuditStore.java

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,17 @@ private MongoDBSyncAuditStore(MongoClient client, String databaseName) {
5959
}
6060

6161
/**
62-
* Generate a new MongoDBSyncAuditStore instance from the specified MongoDBSyncTargetSystem.
63-
* This method uses the MongoClient and database name from the target system to create the audit store.
62+
* Creates a {@link MongoDBSyncAuditStore} using the same MongoDB client and
63+
* database configured in the given {@link MongoDBSyncTargetSystem}.
64+
* <p>
65+
* Only the underlying MongoDB instance (client + database name) is reused.
66+
* No additional target-system configuration is carried over.
6467
*
65-
* @param mongoDBSyncTargetSystem the MongoDBSyncTargetSystem instance to extract the client and database name from
66-
* @return a new MongoDBSyncAuditStore instance
68+
* @param targetSystem the target system from which to derive the client and database
69+
* @return a new audit store bound to the same MongoDB instance as the target system
6770
*/
68-
public static MongoDBSyncAuditStore from(MongoDBSyncTargetSystem mongoDBSyncTargetSystem) {
69-
return new MongoDBSyncAuditStore(mongoDBSyncTargetSystem.getClient(), mongoDBSyncTargetSystem.getDatabaseName());
71+
public static MongoDBSyncAuditStore from(MongoDBSyncTargetSystem targetSystem) {
72+
return new MongoDBSyncAuditStore(targetSystem.getClient(), targetSystem.getDatabaseName());
7073
}
7174

7275
public MongoDBSyncAuditStore withAuditRepositoryName(String auditRepositoryName) {

0 commit comments

Comments
 (0)