Class MongoIndexConflictResolver
java.lang.Object
dev.getelements.elements.dao.mongo.provider.MongoIndexConflictResolver
- All Implemented Interfaces:
IndexConflictResolver
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanresolve(com.mongodb.client.MongoCollection<?> collection, com.mongodb.MongoCommandException cause) Attempts to resolve the given index conflict oncollection.
-
Constructor Details
-
MongoIndexConflictResolver
public MongoIndexConflictResolver()
-
-
Method Details
-
resolve
public boolean resolve(com.mongodb.client.MongoCollection<?> collection, com.mongodb.MongoCommandException cause) Description copied from interface:IndexConflictResolverAttempts to resolve the given index conflict oncollection.- Specified by:
resolvein interfaceIndexConflictResolver- Parameters:
collection- the collection on which the conflicting index create was attemptedcause- the exception raised by the attempted index creation- Returns:
- true if a conflicting index was identified and dropped; false if
causeis not a recognized index-conflict error, or the conflicting index name could not be determined
-