AccessIntent interface

The AccessIntent interface is available to bean-managed persistence (BMP) entity beans.

A BMP entity bean can get and use an instance of the AccessIntent interface. For more information see Using the AccessIntent API.

AccessIntent interface

package com.ibm.websphere.appprofile.accessintent; 

/** 
* This interface defines the essential access intents 
* available at run time. 
*/ 
public interface AccessIntent { 

/** 
* Returns the concurrency control intent, which indicates 
* the application prefers either pessimistic or optimistic 
* concurrency control when accessing the current component 
* in the context of the current transaction. 
*/ 
public int getConcurrencyControl(); 
public final int CONCURRENCY_CONTROL_PESSIMISTIC = 1; 
public final int CONCURRENCY_CONTROL_OPTIMISTIC = 2; 

/** 
* Returns access type intent, which indicates the application 
* intends either update or read access of the current component 
* in the context of the current transaction. 
*/ 
public int getAccessType(); 
public final int ACCESS_TYPE_UPDATE= 1; 
public final int ACCESS_TYPE_READ = 2; 

/** 
* Returns an integer value that indicates that the run time should 
* assume that there will be no collision on retrieved rows. 
*/ 
public int getPessimisticUpdateLockHint();
public final static int PESSIMISTIC_UPDATE_LOCK_HINT_NOCOLLISION = 1;
public final static int PESSIMISTIC_UPDATE_LOCK_HINT_WEAKEST_LOCK_AT_LOAD = 2;
public final static int PESSIMISTIC_UPDATE_LOCK_HINT_NONE = 3;
public final static int PESSIMISTIC_UPDATE_LOCK_HINT_EXCLUSIVE = 4; 

/* 
* Returns an integer value that indicates that the run time should 
* assume that there will be collisions on retrieved rows. 
*/ 
public int getPessimisticUpdateLockHint();
public final static int PESSIMISTIC_UPDATE_LOCK_HINT_NOCOLLISION = 1;
public final static int PESSIMISTIC_UPDATE_LOCK_HINT_WEAKEST_LOCK_AT_LOAD = 2;
public final static int PESSIMISTIC_UPDATE_LOCK_HINT_NONE = 3;
public final static int PESSIMISTIC_UPDATE_LOCK_HINT_EXCLUSIVE = 4; 
 

/** 
* Returns the collection access intent, which indicates the 
* application intends to access the objects returned by the 
* currently executing finder in either serial or random fashion. 
*/ 
public int getCollectionAccess(); 
public final int COLLECTION_ACCESS_RANDOM = 1; 
public final int COLLECTION_ACCESS_SERIAL = 2; 

/** 
* Returns the collection scope, which indicates the maximum 
* lifespan of a lazy collection. 
*/ 
public int getCollectionScope(); 
public final int COLLECTION_SCOPE_TRANSACTION = 1; 
public final int COLLECTION_SCOPE_ACTIVITYSESSION = 2; 
public final int COLLECTION_SCOPE_TIMEOUT = 3; 

/** 
* Returns the timeout value in seconds when collectionScope is Timeout. 
*/ 
public int getCollectionTimeout(); 

/** 
* Returns the number of elements the application requests be contained 
* in each segment of the element collection returned by the currently 
* executing finder. 
*/ 
public int getCollectionIncrement(); 

/** 
* Returns the ReadAheadHint requested by the application for the currently 
* executing finder. 
*/ 
public ReadAheadHint getReadAheadHint(); 

/** 
* Returns the number of elements the application requests be contained in 
* each segment of a query made on a database. 
*/ 
public int getResourceManagerPreFetchIncrement(); 

} 




Related concepts
Access intent service
Related tasks
Access intent policies for EJB 2.x entity beans
Applying access intent policies to beans
Configuring read-read consistency checking with an assembly tool
Applying access intent policies to methods
Related reference
Access intent exceptions
Access intent troubleshooting tips
Reference topic Reference topic    

Terms and conditions for information centers | Feedback

Last updatedLast updated: Feb 6, 2014 8:11:25 PM CST
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=matt&product=was-nd-mp&topic=raxi_api
File name: rejb_axiapi.html