diff options
author | Benoit Foucher <benoit@zeroc.com> | 2012-04-18 14:33:16 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2012-04-18 14:33:16 +0200 |
commit | 2ba4d4e0ca7aeade69ee00ab17d5fa1b69372ffc (patch) | |
tree | 0a381f9b284eb7ca5acc9bca5a97659d19874f9d /cpp/src/Freeze/SharedDbEnv.cpp | |
parent | ICE-4828 - Buffer.h undeclared ptrdiff_t issue on OpenSUSE (diff) | |
download | ice-2ba4d4e0ca7aeade69ee00ab17d5fa1b69372ffc.tar.bz2 ice-2ba4d4e0ca7aeade69ee00ab17d5fa1b69372ffc.tar.xz ice-2ba4d4e0ca7aeade69ee00ab17d5fa1b69372ffc.zip |
Added support for encoding versioning
Diffstat (limited to 'cpp/src/Freeze/SharedDbEnv.cpp')
-rw-r--r-- | cpp/src/Freeze/SharedDbEnv.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/cpp/src/Freeze/SharedDbEnv.cpp b/cpp/src/Freeze/SharedDbEnv.cpp index 1365e7fe95b..2e6e6290f56 100644 --- a/cpp/src/Freeze/SharedDbEnv.cpp +++ b/cpp/src/Freeze/SharedDbEnv.cpp @@ -501,6 +501,11 @@ Freeze::SharedDbEnv::SharedDbEnv(const std::string& envName, string propertyPrefix = string("Freeze.DbEnv.") + envName; string dbHome = properties->getPropertyWithDefault(propertyPrefix + ".DbHome", envName); + string encoding = properties->getPropertyWithDefault(propertyPrefix + ".EncodingVersion", + encodingVersionToString(Ice::currentEncoding)); + _encoding = stringToEncodingVersion(encoding); + checkSupportedEncoding(_encoding); + // // Normally the file lock is necessary, but for read-only situations (such as when // using the FreezeScript utilities) this property allows the file lock to be @@ -595,8 +600,7 @@ Freeze::SharedDbEnv::SharedDbEnv(const std::string& envName, // // Default checkpoint period is every 120 seconds // - Int checkpointPeriod = properties->getPropertyAsIntWithDefault( - propertyPrefix + ".CheckpointPeriod", 120); + Int checkpointPeriod = properties->getPropertyAsIntWithDefault(propertyPrefix + ".CheckpointPeriod", 120); Int kbyte = properties->getPropertyAsIntWithDefault(propertyPrefix + ".PeriodicCheckpointMinSize", 0); if(checkpointPeriod > 0) @@ -608,8 +612,9 @@ Freeze::SharedDbEnv::SharedDbEnv(const std::string& envName, // // Get catalogs // - _catalog = new MapDb(_communicator, catalogName(), CatalogKeyCodec::typeId(), CatalogValueCodec::typeId(), _env); - _catalogIndexList = new MapDb(_communicator, catalogIndexListName(), + _catalog = new MapDb(_communicator, _encoding, catalogName(), CatalogKeyCodec::typeId(), + CatalogValueCodec::typeId(), _env); + _catalogIndexList = new MapDb(_communicator, _encoding, catalogIndexListName(), CatalogIndexListKeyCodec::typeId(), CatalogIndexListValueCodec::typeId(), _env); } |