Пример #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
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
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;
}