|
|||||||||
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_CREATE_CORE_BINDING
Indicates a request for a store binding implementation to return an instance of the core binding. |
static int |
FLG_EVENT_SOURCING
Indicates that the application is operating in event sourcing mode. |
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,
StoreDescriptor descriptor,
IStoreEventHandler eventHandler,
IStoreReplicatorNotificationHandler replicatorNotificationHandler)
Bind to a store using a store descriptor. |
IStoreBinding |
createBinding(String memberName,
StoreDescriptor descriptor,
IStoreEventHandler eventHandler,
IStoreReplicatorNotificationHandler replicatorNotificationHandler,
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. |
IStoreBinding |
createBinding(String memberName,
String storeName,
IStoreEventHandler eventHandler,
int flags)
Convenience method to create a binding using a store descriptor loaded from the default configuration repository. |
IStoreBinding |
createBinding(String memberName,
String storeName,
IStoreEventHandler eventHandler,
IStoreReplicatorNotificationHandler replicatorNotificationHandler,
int flags)
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_CREATE_CORE_BINDING
The core ODS store binding implementation requires the user of the binding to perform sequencing of member control events. By default, the factory will create an instance of the binding that wraps around the core binding and delegates store method calls to the core binding and sequences the method calls along with the member control events. This flag overrides that behavior. If specified, the factory will instantiate the core binding and return to the caller.
Method Detail |
---|
public static final StoreBindingFactory getInstance()
public final IStoreBinding createBinding(String memberName, StoreDescriptor descriptor, IStoreEventHandler eventHandler, IStoreReplicatorNotificationHandler replicatorNotificationHandler, 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.replicatorNotificationHandler
- The handler used by the created
replicator, if one is created, to dispatch its operational notifications.flags
- Specifies flags used to qualify the creation of the binding.
The following flags are permitted for use currently:FLG_EVENT_SOURCING
FLG_CREATE_CORE_BINDING
OdsException
- Thrown in case an error occurs during the creation
of the binding.public final IStoreBinding createBinding(String memberName, StoreDescriptor descriptor, IStoreEventHandler eventHandler, int flags) throws OdsException
This method invokes createBinding(memberName, descriptor, eventHandler, null, flags)
OdsException
public final IStoreBinding createBinding(String memberName, StoreDescriptor descriptor, IStoreEventHandler eventHandler, IStoreReplicatorNotificationHandler replicatorNotificationHandler) throws OdsException
This method invokes createBinding(memberName, descriptor, eventHandler, replicatorNotificationHandler, 0)
OdsException
public final IStoreBinding createBinding(String memberName, StoreDescriptor descriptor, IStoreEventHandler eventHandler) throws OdsException
This method invokes createBinding(memberName, descriptor, eventHandler, null)
OdsException
public final IStoreBinding createBinding(String memberName, String storeName, IStoreEventHandler eventHandler, IStoreReplicatorNotificationHandler replicatorNotificationHandler, int flags) throws OdsException
This method invokes createBinding(memberName, StoreDescriptor.load(storeName), eventHandler, replicatorNotificationHandler, flags)
OdsException
public final IStoreBinding createBinding(String memberName, String storeName, IStoreEventHandler eventHandler) throws OdsException
This method invokes createBinding(memberName, storeName, eventHandler, null, 0)
OdsException
public final IStoreBinding createBinding(String memberName, String storeName, IStoreEventHandler eventHandler, int flags) throws OdsException
This method invokes createBinding(memberName, storeName, eventHandler, null, flags)
OdsException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |