jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Angela Schreiber <anch...@day.com>
Subject Re: SPI caching, was: [jira] Resolved: (JCR-1361) Lock test assumes that changes in one session are immediately visible in different session
Date Wed, 20 Feb 2008 09:06:52 GMT
hi marcel

Marcel Reutegger wrote:
> Here's another idea:
> introduce a method ChildInfo[] NodeInfo.getChildInfos(). The method 
> either returns:
> - all child infos, which also gives the correct number of child nodes. 
> this may also mean that an empty array is returned to indicate there are 
> no child nodes.
> - null, to indicate that there are *lots* of child nodes and the method 
> RepositoryService.getChildInfos() with the iterator should be used.

i'd say that should work.
at least it would open the following possibility:

- create NodeEntry that knows the
   - IDs of its properties (existing: NodeInfo.getPropertyId)
   - IDs and the order of its child-nodes (new)

- avoid an extra call to getChildInfos in the first place
   if only the existence of child-nodes needs to be checked
   without taking a look at the child-nodes themselves.

- if NodeInfo.getChildInfos() was null, the same behaviour
   would apply as today.

Just for clarification: we can't use something like 
NodeInfo.getChildIDs(), because the id may neither reveal the
name nor the index.

marcel, can you open an issue for that?

View raw message