The atg.vfs.switchable.SwitchableLocalFileSystem
class is a VFS implementation that switches between two underlying local file systems and keeps a journal of changes made. This VFS implementation is used in your staging and production environments if you configure your targets for Switch Deployment.
You can configure the following properties of a SwitchableLocalFileSystem
:
Property | Description |
---|---|
| The active directory that contains the live files used by external facilities. No other VFS on the server can use this directory. |
| The inactive directory where file updates are made before performing a switch. No other VFS on the server can use this directory. |
| A dynamically-created directory that stores internal data used during deployments. No other VFS on the server can use this directory. |
| Indicates whether to write VFS modifications to a journal. Note: This property is currently used only by a switchable |
| The list of event listeners that listen for events that indicate the VFS is updated in a deployment. Note: This property is currently used only by a switchable |
| The logical name of the underlying file system to use as the live VFS at initial application startup. This property is analogous to the All switchable VFSs in the target must specify the same name in this property. The name must match the name in the |
| The logical name of the underlying file system to be used as the staging VFS at initial application start-up. All switchable VFSs in the target must specify the same name in this property. |
| Turns on checksum caching for this VFS, which can be used to improve deployment times for systems where large numbers of file assets are being deployed. See Cache Checksums for File Assets for more information on the checksum caching properties in this service. |
| Used if checksum caching is enabled. Specifies the encoding used to save the cache data (UTF-8, by default). See Cache Checksums for File Assets for more information. |
| Enables background deletion if set to true. By default, this property is set to false (see Configure Background Deletion of File System Assets). |
| Sets the deletion thread’s priority. In general, you should let the system set thread priority, and omit this property |
| Specifies in milliseconds how long the deletion thread waits before it begins to delete files from the temporary directory. If set to 0 (the default), deletion begins immediately. |
Collectively, the name1
and name2
properties are analogous to the dataSources
property of a SwitchingDataSource
used by a repository in that they identify the underlying data stores used by the switchable data store, in this case, a switchable VFS. The labels used in these properties must correspond to those used for each SwitchingDataSource
.
For example, if you configured each SwitchingDataSource
as follows:
dataSources=\
Red=/atg/dynamo/service/jdbc/Pool1,\
Blue=/atg/dynamo/service/jdbc/Pool2
Then the name1
and name2
properties in each SwitchableLocalFileSystem
must be configured as follows:
name1=Red
name2=Blue
The /atg/epub/DeploymentServer
uses the logical names for all underlying data stores (for all repositories and VFSs) to verify that all agents in the target performed each switch deployment successfully, or, more specifically, to verify that all agents are using the same underlying store as their live store and likewise the same underlying store as their staging store.
A SwitchableLocalFileSystem
also has two read-only properties that identify the current live and staging directories: liveDataStoreName
and stagingDataStoreName
, respectively. These properties indicate the current state of the VFS.