com.ibm.websphere.appprofile.accessintent
Interface ReadAheadHint


public interface ReadAheadHint

The ReadAheadHint interface provides access to the read ahead hint returned by the getReadAheadHint() method of the AccessIntent interface. It is also used to hold each read-ahead specification for which the Deploy Tool has generated a query & function. Persistence Manager (PM) gets the ReadAheadHint from the current AccessIntent and finds the best match to it among the generated queries; this is the query that actually reads ahead the bean data. 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: 1) EJB type A has a (CMR) relationship with EJB type B and D. 2) EJB type B has a (CMR) relationship with EJB type C. 3) 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. 4) 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. This is a convention agreed to by PM, the Deploy Tool and the AccessIntent portion of Application Profile (WAS.appprofile). "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
 int bestFitRating(ReadAheadHint desiredHint)
          Returns an integer which rates how well this hint matches the given hint.
 java.util.Iterator getIterator()
          Return an iterator over the items
 ReadAheadItem getNextItem()
          Deprecated.  
 void resetCursor()
          Deprecated.  
 

Method Detail

bestFitRating

public int bestFitRating(ReadAheadHint desiredHint)
Returns an integer which rates how well this hint matches the given hint. Typically, the given hint is obtained from the currentAccessIntent and this hint is from one of the generated DataAccessSpecs. The higher the value, the better the fit. A value of -1 means there is a functionally exact match (that is, both have all the same items, regardless of order). Creation date: (2/1/2002 6:12:54 PM)

Parameters:
desiredHint - com.ibm.websphere.appprofile.accessintent.ReadAheadHint
Returns:
int

getIterator

public java.util.Iterator getIterator()
Return an iterator over the items


resetCursor

public void resetCursor()
Deprecated.  

Reset the cursor on ReadAheadItems. The next call to getNextItem() will return the first item and so on. Creation date: (11/30/2001 4:13:24 PM)


getNextItem

public ReadAheadItem getNextItem()
Deprecated.  

Return the next item to be read ahead, or null.

Returns:


 

WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.

 

IBM is a trademark of the IBM Corporation in the United States, other countries, or both.