diff options
Diffstat (limited to 'cpp/demo/Freeze/library/Server.cpp')
-rw-r--r-- | cpp/demo/Freeze/library/Server.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/cpp/demo/Freeze/library/Server.cpp b/cpp/demo/Freeze/library/Server.cpp index abd7cfe07e9..113f520f6f9 100644 --- a/cpp/demo/Freeze/library/Server.cpp +++ b/cpp/demo/Freeze/library/Server.cpp @@ -49,15 +49,16 @@ LibraryServer::runFreeze(int argc, char* argv[], const DBEnvironmentPtr& dbEnv) // // Create an Evictor for books. // - EvictorPtr evictor; - if(properties->getPropertyAsInt("Library.SaveAfterMutatingOperation") > 0) + PersistenceStrategyPtr strategy; + if(properties->getPropertyAsInt("Library.IdleStrategy") > 0) { - evictor = dbBooks->createEvictor(SaveAfterMutatingOperation); + strategy = dbBooks->createIdleStrategy(); } else { - evictor = dbBooks->createEvictor(SaveUponEviction); + strategy = dbBooks->createEvictionStrategy(); } + EvictorPtr evictor = dbBooks->createEvictor(strategy); Int evictorSize = properties->getPropertyAsInt("Library.EvictorSize"); if(evictorSize > 0) { |