Home Help Center

How can I get all Objects in evictor db?

Yunqiao YinYunqiao Yin Member Yin YunqiaoOrganization: BaosteelProject: real time process control system ✭✭
from the evictor.ice
local interface EvictorIterator
{
    bool hasNext();
    Ice::Identity next();
};

inteface Evictor
{
...
 EvictorIterator getIterator(string facet, int batchSize);
...
};
I can get the EvictorIterator from a Evictor ,but the EvictorIterator only give a next operation,I found it is not a real iterator from the begin to the end of all objects stored in the evictor.
So how can I get all objects or all object ids from the evictor interface?
:confused:

Comments

  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi,

    Why do you think it's not returning all the identities of the objects stored in the evictor database? It should work, something like the following for instance should return all the identities of the Ice objects registered with the evictor (with an empty facet):
        Freeze::EvictorIteratorPtr p = _evictor->getIterator("", 100);
        while(p->hasNext())
        {
    	  Ice::Identity id = p->next();
            // Do something with the identity    
        }
    

    Cheers,
    Benoit.
  • Yunqiao YinYunqiao Yin Member Yin YunqiaoOrganization: BaosteelProject: real time process control system ✭✭
    Thank you!

    :) I found I made a stupid mistake!
Sign In or Register to comment.