public class OneWayDatabaseVersionFeature extends Object
currentDatabaseVersionProvider
.
The meaning of database version is the same as the one defined by: BuildUtilsInfo.getDatabaseBuildNumber()
This utility assumes once a feature is enabled this state is permanent and will not call currentDatabaseVersionProvider
anymore.
The reason for this is to be able to enable a feature based on database version and make the isFeatureEnabled()
call cheap so it can be used to enable low level (frequent) features.
The feature can be disabled by the provided system property disableFeaturePropertyName
- check done only at creation time.
If the feature was disabled in the lifetime of this object it will call onFeatureEnabled
in the isFeatureEnabled()
caller thread (i.e.
onFeatureEnabled
the first time isFeatureEnabled()
returns true).Constructor and Description |
---|
OneWayDatabaseVersionFeature(String featureName,
String disableFeaturePropertyName,
int databaseVersionFeatureEnabled,
Supplier<Integer> currentDatabaseVersionProvider,
Runnable onFeatureEnabled) |
Modifier and Type | Method and Description |
---|---|
boolean |
isFeatureEnabled()
Deprecated.
|
@Deprecated public boolean isFeatureEnabled()
Copyright © 2002-2024 Atlassian. All Rights Reserved.