示例#1
0
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());
    }
}
示例#2
0
文件: BankI.cpp 项目: ming-hai/freeze
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;
}
示例#3
0
文件: BankI.cpp 项目: ming-hai/freeze
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;
}