void Test::RemoteEvictorI::destroyAllServants(const string& facetName, const Current&) { // // Don't use such a small value in real applications! // Ice::Int batchSize = 1; Freeze::EvictorIteratorPtr p = _evictor->getIterator(facetName, batchSize); while(p->hasNext()) { _evictor->remove(p->next()); } }
Casino::PlayerPrxSeq BankI::getPlayers(const Ice::Current& current) const { Casino::PlayerPrxSeq result; Freeze::EvictorIteratorPtr p = _playerEvictor->getIterator("", 10); while(p->hasNext()) { Ice::Identity ident = p->next(); result.push_back(Casino::PlayerPrx::uncheckedCast(current.adapter->createProxy(ident))); } return result; }
vector<CasinoStore::PersistentBetPrx> BankI::getBets(const Ice::ObjectAdapterPtr& adapter) const { vector<CasinoStore::PersistentBetPrx> result; Freeze::EvictorIteratorPtr p = _betEvictor->getIterator("", 100); while(p->hasNext()) { Ice::Identity ident = p->next(); result.push_back(CasinoStore::PersistentBetPrx::uncheckedCast(adapter->createProxy(ident))); } return result; }