Class IntersectedIndexesCheckOnCluster
java.lang.Object
io.github.mfvanek.pg.checks.cluster.IntersectedIndexesCheckOnCluster
- All Implemented Interfaces:
DatabaseCheckOnCluster<io.github.mfvanek.pg.model.index.DuplicatedIndexes>
,DiagnosticAware
,RawTypeAware<io.github.mfvanek.pg.model.index.DuplicatedIndexes>
Check for intersected (partially identical) indexes on all hosts in the cluster.
- Since:
- 0.6.0
-
Constructor Summary
ConstructorDescriptionIntersectedIndexesCheckOnCluster
(io.github.mfvanek.pg.connection.HighAvailabilityPgConnection haPgConnection) -
Method Summary
Modifier and TypeMethodDescriptionfinal List<io.github.mfvanek.pg.model.index.DuplicatedIndexes>
check
(io.github.mfvanek.pg.model.PgContext pgContext, Predicate<? super io.github.mfvanek.pg.model.index.DuplicatedIndexes> exclusionsFilter) Executes the check in the specified schema.protected void
doBeforeExecuteOnHost
(io.github.mfvanek.pg.connection.PgConnection connectionToHost) final Diagnostic
Gets the diagnostic - a rule related to the check.Class<io.github.mfvanek.pg.model.index.DuplicatedIndexes>
getType()
Gets original java type.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.github.mfvanek.pg.common.maintenance.DatabaseCheckOnCluster
check, check, check
-
Constructor Details
-
IntersectedIndexesCheckOnCluster
public IntersectedIndexesCheckOnCluster(@Nonnull io.github.mfvanek.pg.connection.HighAvailabilityPgConnection haPgConnection)
-
-
Method Details
-
getType
Gets original java type.- Specified by:
getType
in interfaceRawTypeAware<T extends io.github.mfvanek.pg.model.DbObject>
- Returns:
- java type representing database object
-
getDiagnostic
Gets the diagnostic - a rule related to the check.- Specified by:
getDiagnostic
in interfaceDiagnosticAware
- Returns:
- diagnostic
- See Also:
-
check
@Nonnull public final List<io.github.mfvanek.pg.model.index.DuplicatedIndexes> check(@Nonnull io.github.mfvanek.pg.model.PgContext pgContext, @Nonnull Predicate<? super io.github.mfvanek.pg.model.index.DuplicatedIndexes> exclusionsFilter) Executes the check in the specified schema.- Specified by:
check
in interfaceDatabaseCheckOnCluster<T extends io.github.mfvanek.pg.model.DbObject>
- Parameters:
pgContext
- check's context with the specified schemaexclusionsFilter
- predicate to filter out unnecessary results- Returns:
- list of deviations from the specified rule
- See Also:
-
PgContext
-
doBeforeExecuteOnHost
protected void doBeforeExecuteOnHost(@Nonnull io.github.mfvanek.pg.connection.PgConnection connectionToHost)
-