com.ibm.websphere.appprofile.accessintent
Interface ReadAheadHint
- public interface ReadAheadHint
A read ahead hint is a canonical representation of which nodes in an EJB relationship graph should be read in from the backing store at the same time. EJB relationship graphs are defined by EJB container-managed relationships (CMR).
Assume there is a CMP bean type A which has a finder method that returns instances of bean A. A read ahead hint for this method is specified using the following notation: RelB.RelC; RelD
The preceeding notation reveals:
- EJB type A has a (CMR) relationship with EJB type B and D.
- EJB type B has a (CMR) relationship with EJB type C.
- That, for each bean of type A that is retrieved from the database, its directly-related B and D beans and its indirectly-related C beans are also retrieved.
- The order of the retrieved bean data columns in each ResultSet record is the same as the order they are specified in the read-ahead hint: an A bean, a B bean (or null), a C bean (or null), a D bean (or null).
The actual tokens "RelB", etc. must be the CMR field names for the relationships as defined in the deployment descriptor.
"RelB.RelC" and "RelD" above are path expressions. Each path expression in a ReadAheadHint is represented by one or more ReadAheadItems. Each ReadAheadItem represents a single bean to be read ahead, so "RelB.RelC" actually becomes two ReadAheadItems, while "RelD" becomes only one. One ReadAheadHint manages a set of ReadAheadItems.
Method Summary
Modifier and Type | Method and Description |
---|---|
|
bestFitRating(ReadAheadHint desiredHint)
Returns an integer which rates how well this hint matches the given hint.
|
|
getIterator()
Return an iterator over the items
|
getNextItem()
Deprecated.
|
|
|
resetCursor()
Deprecated.
|
Method Detail
bestFitRating
- int bestFitRating(ReadAheadHint desiredHint)
desiredHint
- com.ibm.websphere.appprofile.accessintent.ReadAheadHint getIterator
- java.util.Iterator getIterator( )
resetCursor
- void resetCursor()
getNextItem
- ReadAheadItem getNextItem()