logger.log(Level.CONFIG,
"Creating DataServiceImpl properties:{0}, " +
"systemRegistry:{1}, txnProxy:{2}",
properties, systemRegistry, txnProxy);
}
DataStore storeToShutdown = null;
try {
PropertiesWrapper wrappedProps = new PropertiesWrapper(properties);
appName = wrappedProps.getProperty(StandardProperties.APP_NAME);
if (appName == null) {
throw new IllegalArgumentException(
"The " + StandardProperties.APP_NAME +
" property must be specified");
} else if (systemRegistry == null) {
throw new NullPointerException(
"The systemRegistry argument must not be null");
} else if (txnProxy == null) {
throw new NullPointerException(
"The txnProxy argument must not be null");
}
debugCheckInterval = wrappedProps.getIntProperty(
DEBUG_CHECK_INTERVAL_PROPERTY, Integer.MAX_VALUE);
detectModifications = wrappedProps.getBooleanProperty(
DETECT_MODIFICATIONS_PROPERTY, Boolean.TRUE);
String dataStoreClassName = wrappedProps.getProperty(
DATA_STORE_CLASS_PROPERTY);
optimisticWriteLocks = wrappedProps.getBooleanProperty(
OPTIMISTIC_WRITE_LOCKS, Boolean.FALSE);
trackStaleObjects = wrappedProps.getBooleanProperty(
TRACK_STALE_OBJECTS_PROPERTY, Boolean.FALSE);
TaskScheduler taskScheduler =
systemRegistry.getComponent(TaskScheduler.class);
Identity taskOwner = txnProxy.getCurrentOwner();
scheduler = new DelegatingScheduler(taskScheduler, taskOwner);
NodeType nodeType =
wrappedProps.getEnumProperty(StandardProperties.NODE_TYPE,
NodeType.class,
NodeType.singleNode);
AccessCoordinator accessCoordinator =
systemRegistry.getComponent(AccessCoordinator.class);
DataStore baseStore;
if (dataStoreClassName != null) {
baseStore = wrappedProps.getClassInstanceProperty(
DATA_STORE_CLASS_PROPERTY, DataStore.class,
new Class[] { Properties.class, AccessCoordinator.class },
properties, accessCoordinator);