SyncFactory by default as the
com.sun.rowset.providers.RIOptimisticProvider.
As an extension of the SyncProvider abstract
class, it provides the reader and writer classes required by disconnected
rowsets as javax.sql.RowSetReader and javax.sql.RowSetWriter
interface implementations. As a reference implementation,
RIOptimisticProvider provides a
fully functional implementation offering a medium grade classification of
synchronization, namely GRADE_CHECK_MODIFIED_AT_COMMIT. A
disconnected RowSet implementation using the
RIOptimisticProvider can expect the writer to
check only rows that have been modified in the RowSet against
the values in the data source. If there is a conflict, that is, if a value
in the data source has been changed by another party, the
RIOptimisticProvider will not write any of the changes to the data
source and will throw a SyncProviderException object.
RowSet implementations may opt to use this
SyncProvider implementation in one of two ways:
setSyncProvider method
defined in the CachedRowSet interface
CachedRowset crs = new FooCachedRowSetImpl();
crs.setSyncProvider("com.sun.rowset.providers.RIOptimisticProvider");
RowSet
implementation
CachedRowset crs = new FooCachedRowSetImpl(
"com.sun.rowset.providers.RIOptimisticProvider");
RIOptimisticProvider implementation is
the default provider, it will always be the provider when no provider ID is
specified to the constructor.
See the standard RowSet reference implementations in the
com.sun.rowset package for more details.
javax.sql.rowset.spi.SyncProvider , javax.sql.rowset.spi.SyncProviderException , javax.sql.rowset.spi.SyncFactory , javax.sql.rowset.spi.SyncFactoryException
| Modifier and Type | Field and Description |
|---|---|
| private String | providerID
The unique provider identifier. |
| private CachedRowSetReader | |
| private JdbcRowSetResourceBundle | resBundle
ResourceBundle |
| pack-priv static final long | |
| private String | vendorName
The vendor name of this SyncProvider implementation |
| private String | versionNumber
The version number of this SyncProvider implementation |
| private CachedRowSetWriter |
| Access | Constructor and Description |
|---|---|
| public | RIOptimisticProvider()
Creates an |
| Modifier and Type | Method and Description |
|---|---|
| public int | Returns: SyncProvider.DATASOURCE_NO_LOCK.
The reference implementation does not support data source locks.Implements abstract javax. Returns the active data source lock severity in this
reference implementation of the |
| public int | getProviderGrade()
Implements abstract javax. Returns the |
| public String | Returns: String Provider ID of this persistence providerImplements abstract javax. Returns the |
| public RowSetReader | Returns: thejavax.sql.RowSetReader object for this
RIOptimisticProvider objectImplements abstract javax. Returns the |
| public RowSetWriter | Returns: thejavax.sql.RowSetWriter object for this
RIOptimisticProvider objectImplements abstract javax. Returns the |
| public String | Returns: theString detailing the vendor name of this
SyncProviderImplements abstract javax. Returns the vendor name of the Reference Implementation Optimistic Synchronization Provider |
| public String | Returns: theString detailing the version number of this SyncProviderImplements abstract javax. Returns the release version ID of the Reference Implementation Optimistic Synchronization Provider. |
| private void | |
| public void | setDataSourceLock(int
An datasource_lock)int indicating the level of locking to be
set; must be one of the following constants:
SyncProvider.DATASOURCE_NO_LOCK,
SyncProvider.DATASOURCE_ROW_LOCK,
SyncProvider.DATASOURCE_TABLE_LOCK,
SyncProvider.DATASOURCE_DB_LOCk
Implements abstract javax. Modifies the data source lock severity according to the standard
|
| public int | Returns: SyncProvider.NONUPDATABLE_VIEW_SYNC. The
the reference implementation does not support updating tables
that are the source of a view.Implements abstract javax. Returns the supported updatable view abilities of the
reference implementation of the |
| providerID | back to summary |
|---|---|
| private String providerID The unique provider identifier. | |
| reader | back to summary |
|---|---|
| private CachedRowSetReader reader | |
| resBundle | back to summary |
|---|---|
| private JdbcRowSetResourceBundle resBundle ResourceBundle | |
| serialVersionUID | back to summary |
|---|---|
| pack-priv static final long serialVersionUID | |
| vendorName | back to summary |
|---|---|
| private String vendorName The vendor name of this SyncProvider implementation | |
| versionNumber | back to summary |
|---|---|
| private String versionNumber The version number of this SyncProvider implementation | |
| writer | back to summary |
|---|---|
| private CachedRowSetWriter writer | |
| RIOptimisticProvider | back to summary |
|---|---|
| public RIOptimisticProvider() Creates an
This provider is available to all disconnected | |
| getDataSourceLock | back to summary |
|---|---|
| public int getDataSourceLock() throws SyncProviderException Implements abstract javax. Returns the active data source lock severity in this
reference implementation of the
| |
| getProviderGrade | back to summary |
|---|---|
| public int getProviderGrade() Implements abstract javax. Returns the | |
| getProviderID | back to summary |
|---|---|
| public String getProviderID() Implements abstract javax. Returns the
| |
| getRowSetReader | back to summary |
|---|---|
| public RowSetReader getRowSetReader() Implements abstract javax. Returns the
| |
| getRowSetWriter | back to summary |
|---|---|
| public RowSetWriter getRowSetWriter() Implements abstract javax. Returns the
| |
| getVendor | back to summary |
|---|---|
| public String getVendor() Implements abstract javax. Returns the vendor name of the Reference Implementation Optimistic Synchronization Provider
| |
| getVersion | back to summary |
|---|---|
| public String getVersion() Implements abstract javax. Returns the release version ID of the Reference Implementation Optimistic Synchronization Provider.
| |
| readObject | back to summary |
|---|---|
| private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException | |
| setDataSourceLock | back to summary |
|---|---|
| public void setDataSourceLock(int datasource_lock) throws SyncProviderException Implements abstract javax. Modifies the data source lock severity according to the standard
| |
| supportsUpdatableView | back to summary |
|---|---|
| public int supportsUpdatableView() Implements abstract javax. Returns the supported updatable view abilities of the
reference implementation of the
| |