FIFO and entry inheritance

Greetings GigaSpaces community!

I'm designing a simple priority queuing system using GigaSpaces CE and it's working quite well. I have one issue that I'd like to ask about.

I have 3 different classes of Entry that represent work items and each one has a different set of properties. All 3 of them inherit from a PrioritizedEntry class, which exposes a single field: priority, which can have one of 3 values: HIGH, NORMAL, or LOW. PrioritizedEntry extends MetaDataEntry and I've ensured that every instance has called +setFifo(true)+.

My worker processes are doing take() calls trying to find the "oldest" entry in the space that has the highest priority. First I look for any PrioritizedEntry objects in the space with a priority=HIGH, then NORMAL, then LOW.

I have a simple test that does the following: (Assume that I have subclasses of PriortizedEntry named A, B, and C)

  1. Inserts instances of PrioritizedEntry into the space (all with priority=NORMAL)
  2. These entries are entered in the following order: A1, A2, B1, A3, B2, C1, C2
  3. I think perform a take operation using a template PrioritizedEntry with all fields nulled out except for priority, which is set to NORMAL.
  4. The entries are taken out in the following order: A1, A2, A3, B1, B2, C1, C2

So it appears that FIFO is being obeyed between instances of the same type of Entry, but not across types (if that makes sense). I would expect to be able to pull those entries out in the same order they were added to the space. Does this seem reasonable? What might I be missing?

Thank you for your time!

{quote}This thread was imported from the previous forum. For your reference, the original is [available here|]{quote}

asked 2006-11-01 12:43:01 -0500

bdotzour gravatar image

updated 2013-08-08 09:52:00 -0500

jaissefsfex gravatar image
edit retag flag offensive close merge delete