Archived

This forum has been archived. Please start a new discussion on GitHub.

How can I get all Objects in evictor db?

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

  • benoit
    benoit Rennes, France
    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.
  • Thank you!

    :) I found I made a stupid mistake!