Bugfix/#43 fix controller restart on config change#114
Bugfix/#43 fix controller restart on config change#114DivineThreepwood merged 18 commits intodevfrom
Conversation
…ler_restart_on_config_change
| * #L% | ||
| */ | ||
|
|
||
| class CustomUnitPool : Manageable<Collection<Filter<UnitConfigType.UnitConfig>>> { |
Check warning
Code scanning / detekt
Too many functions inside a/an file/class/object/interface always indicate a violation of the single responsibility principle. Maybe the file/class/object/interface wants to manage too many things at once. Extract functionality which clearly belongs together.
| */ | ||
|
|
||
| class CustomUnitPool : Manageable<Collection<Filter<UnitConfigType.UnitConfig>>> { | ||
| private val UNIT_REMOTE_REGISTRY_LOCK = ReentrantReadWriteLock() |
Check warning
Code scanning / detekt
Variable names should follow the naming convention set in the projects configuration.
|
|
||
| @Throws(BCOGraphQLError::class) | ||
| fun subscribeUnits(unitFilter: UnitFilter?): Publisher<UnitDataType.UnitData> { | ||
| fun subscribeUnits(unitFilter: UnitFilter): Publisher<UnitDataType.UnitData> { |
Check warning
Code scanning / detekt
Restrict the number of throw statements in methods.
| import org.openbase.bco.dal.lib.layer.unit.UnitRemote | ||
| import org.openbase.bco.registry.remote.Registries | ||
| import org.openbase.bco.registry.unit.lib.filter.UnitConfigFilterImpl | ||
| import org.openbase.jul.exception.* |
Check warning
Code scanning / detekt
Wildcard imports should be replaced with imports using fully qualified class names. Wildcard imports can lead to naming conflicts. A library update can introduce naming clashes with your classes which results in compilation errors.
|
|
||
| class CustomUnitPool : Manageable<Collection<Filter<UnitConfigType.UnitConfig>>> { | ||
| private val UNIT_REMOTE_REGISTRY_LOCK = ReentrantReadWriteLock() | ||
| private var unitRegistryDataObserver: Observer<DataProvider<UnitRegistryDataType.UnitRegistryData>, UnitRegistryDataType.UnitRegistryData> |
Check warning
Code scanning / detekt
Line detected that is longer than the defined maximum line length in the code style.
| unitConfigDiff = ProtobufListDiff() | ||
| unitRemoteRegistry = RemoteControllerRegistry() | ||
| unitRegistryDataObserver = | ||
| Observer { source: DataProvider<UnitRegistryDataType.UnitRegistryData>, data: UnitRegistryDataType.UnitRegistryData? -> sync() } |
Check warning
Code scanning / detekt
Line detected that is longer than the defined maximum line length in the code style.
| * If the pool is already active, then the filter is directly applied. | ||
| * If you call this method twice, only the latest filter set is used. | ||
| * | ||
| * @param unitFilter this is a unit filter that can be used to limit the number of unit to observer. No filter means every unit is observed by this pool. |
Check warning
Code scanning / detekt
Line detected that is longer than the defined maximum line length in the code style.
| * If the pool is already active, then the filter is directly applied. | ||
| * If you call this method twice, only the latest filter set is used. | ||
| * | ||
| * @param filters this set of filters can be used to limit the number of unit to observer. No filter means every unit is observed by this pool. |
Check warning
Code scanning / detekt
Line detected that is longer than the defined maximum line length in the code style.
| * If the pool is already active, then the filter is directly applied. | ||
| * If you call this method twice, only the latest filter set is used. | ||
| * | ||
| * @param filters this set of filters can be used to limit the number of unit to observer. No filter means every unit is observed by this pool. |
Check warning
Code scanning / detekt
Line detected that is longer than the defined maximum line length in the code style.
| Registries.getUnitRegistry().removeDataObserver(unitRegistryDataObserver) | ||
| } catch (ex: NotAvailableException) { | ||
| // if the registry is not available an observer deregistration is not required. | ||
| // This can for example be the case when the unit registry has already been terminated during the shutdown progress. |
Check warning
Code scanning / detekt
Line detected that is longer than the defined maximum line length in the code style.
DivineThreepwood
left a comment
There was a problem hiding this comment.
from my side everything is fine.
module/dal/remote/src/main/java/org/openbase/bco/dal/remote/layer/unit/Units.java
Show resolved
Hide resolved
module/dal/remote/src/main/java/org/openbase/bco/dal/remote/layer/unit/Units.java
Show resolved
Hide resolved
…ler_restart_on_config_change
📜 Description
❗ Blocked by: openbase/jul#104
Code changes proposed during fixing issue #43 that is actually fixed in Jul PR openbase/jul#104