|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.neeve.root.RootObject
com.neeve.ods.OdsObject
com.neeve.ods.StoreBindingFactory
public final class StoreBindingFactory
The store binding factory.
The store binding factory, a singleton object, provides methods to create store bindings.
Field Summary | |
---|---|
static int |
FLG_EVENT_SOURCING
Indicates that the application is operating in event sourcing mode. |
static int |
FLG_NOAUTOOPEN
Specifies that the store should not be auto-opened. |
Method Summary | |
---|---|
IStoreBinding |
createBinding(String memberName,
StoreDescriptor descriptor,
IStoreEventHandler eventHandler)
Bind to a store using a store descriptor. |
IStoreBinding |
createBinding(String memberName,
StoreDescriptor descriptor,
IStoreEventHandler eventHandler,
int flags)
Bind to a store using a store descriptor. |
IStoreBinding |
createBinding(String memberName,
String storeName,
IStoreEventHandler eventHandler)
Convenience method to create a binding using a store descriptor loaded from the default configuration repository. |
static StoreBindingFactory |
getInstance()
Get the singleton store binding factory instance. |
Methods inherited from class com.neeve.root.RootObject |
---|
getChecked, getThreaded, getTracer, setChecked, setTracer |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int FLG_EVENT_SOURCING
This flag is used during binding creation to specify that the application is operating in event sourcing mode (as opposed to state replication mode. When this flag is set, ODS only replicates send operations and does not replicate state change operations. State can be maintained in ODS but is just not replicated. Also, when operating in event sourcing mode, ODS materializes state from the persistent store for primaries and backups. In state replication mode, state is materialized only for primaries while backups initialize their state from the operating primary at the time the backup joins the store.
public static final int FLG_NOAUTOOPEN
Method Detail |
---|
public static final StoreBindingFactory getInstance()
public final IStoreBinding createBinding(String memberName, StoreDescriptor descriptor, IStoreEventHandler eventHandler, int flags) throws OdsException
memberName
- The name of the member establishing the store binding.
The member name needs to be unique across all members (bindings) of a
store. This value can be null in which case a unique name will be
dynamically created to for the user of the binding being established.
The caller is responsible for ensuring uniqueness of the name across
all store members in case a non-null value is specified.descriptor
- The descriptor describing the store to bind to.eventHandler
- The event handler to be used by the created binding
to dispatch its events.flags
- Specifies flags used to qualify the creation of the binding.
The following flags are permitted for use currently:FLG_EVENT_SOURCING
OdsException
- Thrown in case an error occurs during the creation
of the binding.public final IStoreBinding createBinding(String memberName, StoreDescriptor descriptor, IStoreEventHandler eventHandler) throws OdsException
Convenience method that invokes the following:
createBinding(memberName, descriptor, eventHandler, 0)
OdsException
public final IStoreBinding createBinding(String memberName, String storeName, IStoreEventHandler eventHandler) throws OdsException
memberName
- The name of the member establishing the store binding.
See createBinding(String, StoreDescriptor, IStoreEventHandler)
for further information on this parameter.storeName
- The name of the store to bind to. The store name is
used to locate the descriptor from the configuration repository.eventHandler
- The event handler to be used by the created binding
to dispatch its events.
OdsException
- Thrown in case an error occurs during the creation
of the binding.
This method creates a store binding using a store identified by name.
It first loads a store descriptor from the default configuration
repository using {@link StoreDescriptor#load} and then supplied the
created descriptor to {@link #createBinding(String, StoreDescriptor,
IStoreEventHandler)} to establish the store binding.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |