DataService
based on {@link DataStoreImpl}. The {@link #DataServiceImpl constructor} requires the com.sun.sgs.app.name
property, and supports both these public configuration properties and the following additional properties:
{@value #DATA_STORE_CLASS_PROPERTY}
com.sun.sgs.impl.service.data.store.net.DataStoreClient
unless the {@code com.sun.sgs.node.type} property is {@code singleNode}, which defaults to com.sun.sgs.impl.service.data.store.DataStoreImpl
{@value #DETECT_MODIFICATIONS_PROPERTY}
true
true
, then applications need to call {@link DataManager#markForUpdate DataManager.markForUpdate} or {@link ManagedReference#getForUpdate ManagedReference.getForUpdate} for any modified objects to make surethat the modifications are recorded by the DataService
.
{@value #DEBUG_CHECK_INTERVAL_PROPERTY}
Integer.MAX_VALUE
DataService
operations to skip between checks of the consistency of the managed references table. Note that the number of operations is measured separately for each transaction. This property is intended for use in debugging.
{@value #OPTIMISTIC_WRITE_LOCKS}
false
false
, which is the default, the service acquires write locks as soon as it knows that an object is being modified. If true
, the service delays obtaining write locks until commit time, which may improve performance in some cases, typically when there is low contention. Note that setting this flag to true
does not delay write locks when removing objects.
{@value #TRACK_STALE_OBJECTS_PROPERTY}
false
true
, the DataService
keeps track of persistent or removed objects from completed transactions and throws {@link TransactionNotActiveException} if the application refersto those objects from another transaction.
The constructor also passes the properties to the {@link DataStoreImpl}constructor, which supports additional properties.
This class uses the {@link Logger} namedcom.sun.sgs.impl.service.data.DataServiceImpl
to log information at the following logging levels:
It also uses an additional {@code Logger} named {@code com.sun.sgs.impl.service.data.DataServiceImpl.detect.modifications} to loginformation about managed objects that are found to be modified but were not marked for update. Note that this logging output will only be performed if the {@code com.sun.sgs.impl.service.data.DataServiceImpl.detect.modifications} propertyis {@code true}.
In addition, operations that throw a {@link TransactionAbortedException}will log the failure to the {@code Logger} named {@code com.sun.sgs.impl.service.data.DataServiceImpl.abort}, to make it easier to debug concurrency conflicts by just logging aborts.
|
|
|
|
|
|
|
|
|
|
|
|