-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Reasoning Behind Collections Operation Queue
PostPosted: Fri Jan 11, 2013 5:44 pm 
Newbie

Joined: Fri Jan 11, 2013 4:16 pm
Posts: 3
All collections that descend from AbstractPersistentCollection have an operation queue that automagically defers certain operations to be performed later. (One operation that can be queued is adding an element to the collection. Another is clearing the collection.)

The following function determines whether to queue an operation or apply it immediately:

Code:
protected boolean isOperationQueueEnabled() {
   return !initialized &&
      isConnectedToSession() &&
           isInverseCollection();
}



It is called at many points -- for example, when you .add() an item to a collection.

My question is this: Why queue operations only when the collection is an inverse collection? More generally, what's the reasoning behind these three criteria, and the queuing strategy as a whole?

Thanks,

-John


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.