org.sandev.basics.DataManager
Class DataManagerNodeDecl

java.lang.Object
  extended by org.sandev.basics.DataManager.DataManagerNodeDecl
Direct Known Subclasses:
DataManagerNodeBase, DataManagerNodeInstance

public class DataManagerNodeDecl
extends java.lang.Object

DataManager accepts incoming updates and queries, and responds with the updated or requested information. It functions as a general persistence and ad hoc data retrieval interface.

More specifically, the DataManager receives any synchronous inbound SandMessage but will return an error for anything it does not understand. It is generally expected to understand any SandUpdateMessage or SandQueryMessage generated from a persistent struct, AggregateUpdate messages, and (optionally) DataImportExport messages. The bulk of the processing (including structural verification of the persistent store and initial data verification) is accomplished through the configured Persister.

The DataManager node locally broadcasts updates. Most configurations will subscribe a CacheManager, which in turn notifies any subscribers when their cached information has gone out of date.

distributed databases, clustering, and failover:

The DataManager provides an interface between the application messaging and the capabilities of the configured Persister. If the Persister supports clustering and failover (either by itself or by virtue of connecting to a database with these capabilities), then those capabilities extend to the DataManager. Likewise if the Persister supports distributed updates and queries, then the DataManager will support distributed updates and queries.

An application is typically configured with one DataManager node instance, but can be configured with several provided this is supported by the underlying Persister and the application semantics.

inbound synchronous message calls:

outbound asynchronous message sends:


Field Summary
protected  int maxQueryReturn
          The maximum number of instances to return in response to a query.
protected  int maxQueryReturnSizeKb
          The maximum size of the returned information (in kilobytes).
protected  java.lang.String persisterDataSource
          The data source for our Persister to use.
protected  int updateTimeBatchOverride
          Override the last update timestamp processing.
 
Constructor Summary
DataManagerNodeDecl()
           
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

maxQueryReturn

protected int maxQueryReturn
The maximum number of instances to return in response to a query. If there are more instances then what fits, the remainder can be retrieved with a subsequent query for the next page.

declared default value: 30000
range match expression: > 0
Length in characters, normal: 5 max: 20
declared printname: max query return
help text: The maximum number of instances to return in response to a query.

maxQueryReturnSizeKb

protected int maxQueryReturnSizeKb
The maximum size of the returned information (in kilobytes). This is used for setting a hard limit on what can be returned, which can be useful when set in conjunction with messaging.

declared default value: 524288
range match expression: > 0
Length in characters, normal: 5 max: 20
declared printname: max query return size (kb)
help text: The maximum size of the returned information (in kilobytes).

updateTimeBatchOverride

protected int updateTimeBatchOverride
Override the last update timestamp processing. This should generally always be left off, but when performing a batch data import, you may want to switch this override on at runtime. The effect is to indicate to the Persister that the data should be persisted "as is", with the specified timestamp values. This allows you to effectively reconstruct a database from an exported serialized form. Generally we recommend using a native database backup for backup/restore purposes, but for merge operations a data import is sometimes the best choice. Do not use this flag unless you are absolutely sure it's what you want to do, it is for temporary runtime use only. We do not recommend ever using this with a production database.

declared default value: OFF

enumerated constant values:

  • OFF("off") = 0
  • ON("on") = 1
"is" boolean methods are generated for this field.
declared invalid value: -1
declared printname: update time batch override
help text: Override the last update timestamp processing.

persisterDataSource

protected java.lang.String persisterDataSource
The data source for our Persister to use. If no value is specified for the config param, then the default value from DataManagerInfo.DATASOURCE is used. This allows the datasource to be managed within the project build declaration, while being overridden in the deployment config.

The dataSource can hold any value required by the Persister to set up and/or connect to whatever kind of supporting database it is using. This can be a single identifier, or formatted text containing a source plus username/password information. The Persister calls back to the DataManager to retrieve this text, and then uses the value to set up for work.

declared default value: ""
Length in characters, normal: 60 max: 255
declared printname: persister datasource
help text: The data source for our Persister to use.
Constructor Detail

DataManagerNodeDecl

public DataManagerNodeDecl()