| <!-- |
| /*************************************************************************************************************************** |
| * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file |
| * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file |
| * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance |
| * with the License. You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an |
| * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the |
| * specific language governing permissions and limitations under the License. |
| ***************************************************************************************************************************/ |
| --> |
| |
| File System Changes |
| |
| <p> |
| In general, external file modifications will be detected immediately in the <code>Config</code> |
| object when a watcher thread is enabled (explained later). |
| Otherwise, they are detected when a commit is performed. |
| </p> |
| <p> |
| The <code>Config</code> object maintains an in-memory record of all changes that have been applied to it |
| through getters and setters. |
| When the underlying file changes, the new contents are loaded and the in-memory changes are then |
| applied to the new configuration. |
| This provides the benefits of real-time updates of configurations while not losing any changes made in the JVM. |
| </p> |
| <p> |
| If the <code>commit()</code> method is called on the <code>Config</code> objects after the file system |
| contents have been modified, we will then reload the configuration from the file system, apply the |
| changes, and then try to save to the file system again (up to 10 times). |
| </p> |
| <p> |
| If the same entry is both internally and externally modified, the external modification will be |
| overwritten (although both change events will be seen by listeners). |
| </p> |