Menu

#4 Lazy loading with interfaces

open
nobody
None
5
2002-11-26
2002-11-26
Anonymous
No

When an object has an attribute with an Interface as a
type (e.g. List, Map etc.) instead of a class, defer
loading of the object implementing the Interface until
one of the interfaces' methods is actually called.

Design challenge: downcasting from interfaces to
classes would not be possible - because the interface
will be implemented by a Proxy, not by the 'real thing'
. A workaround might be to enable this only for
Collection classes, where the largest benefit of
deferred loading will be achieved anyway.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB