API Operations for Setting up Persistence

You can set up persistence for the space using the following API operations:

C API
By using the tibasSpaceDef_SetPersistenceType() function and the tibasSpaceDef_SetPersistencePolicy() function.
Java API
By using the PersistenceType and PersistencePolicy methods of the SpaceDef class.
.NET API
By using the PersistenceType and PersistencePolicy methods of the SpaceDef class

For descriptions of the ActiveSpaces example programs used to set up persistence, see ASPersistence and Shared-Nothing Persistence.

The tibasSpaceDef_SetPersistenceType() Function

The ActiveSpaces C API provides the tibasSpaceDef_SetPersistenceType() Function. When you call this function, you can specify:

TIBAS_PERSISTENCE_NONE
Do not persist objects in the space.
TIBAS_PERSISTENCE_SHARED_ALL
Use shared-all persistence
TIBAS_PERSISTENCE_SHARED_NOTHING
Use shared-nothing persistence.

The tibasSpaceDef_SetPersistencePolicy() Function

The C API provides the tibasSpaceDef_SetPersistenceType() function specifies the persistence policy to use on the space. You can specify PERSISTENCE_SYNC or PERSISTENCE_ASYNC.

Using the PersistenceType and PersistencePolicy Methods

In the Java API and the .NET API, the SpaceDef class provides the following methods:

PersistenceType Method
Lets you set persistence to NONE, SHARE_ALL, or SHARE_NOTHING.
PersistencePolicy Method
Lets you set the persistence policy to ASYNC or SYNC.