• 沒有找到結果。

TIBAS_LOCK_SCOPE_PROCESS

在文檔中 TIBCO ActiveSpaces (頁 101-105)

tibasSpaceDef_Create()

TIBAS_LOCK_SCOPE_PROCESS

Specifies that processes cannot write over data that is locked by another process; however, threads within the same process can overwrite data locked by another thread in the process.

See Also

tibasSpaceDef_SetLockScope()

tibasSpaceDef_SetLockScope()

Specifies the lock scope value that is set for a specified space.

Declaration

tibas_status tibasSpaceDef_SetLockScope(

tibasSpaceDef spaceDef, tibas_lockScope lockScope);

Parameters

Parameter Description

SpaceDef Specify the spaceDef object that identifies the space for which you want to set the lock scope value.

lockScope Specifies the lock scope. Can be one of the following:

TIBAS_LOCK_SCOPE_NONE

TIBAS_LOCK_SCOPE_THREAD

TIBAS_LOCK_SCOPE_PROCESS

Remarks

Use the tibasSpaceDef_SetLockScope() function to specify the lock scope value that is set for a specified space.

Setting a lock scope prevents either threads or processes from writing over locked data.

The lock scope value can be one of the following:

TIBAS_LOCK_SCOPE_NONE

Specifies that locks do not have a scope.

TIBAS_LOCK_SCOPE_THREAD

Specifies that threads cannot write over data that is locked by another thread.

TIBAS_LOCK_SCOPE_PROCESS

Specifies that processes cannot write over data that is locked by another process; however, threads within the same process can overwrite data locked by another thread in the process.

See Also

tibasSpaceDef_GetLockScope()

tibasSpaceDef_GetNumFields()

Returns the number of fields associated with the space definition.

Declaration

tibas_status tibasSpaceDef_GetNumFields (tibasSpaceDef spaceDef,

tibas_int* numFields)

Parameters

Parameter Description

spaceDef The TIBCO ActiveSpaces entity on which the function is invoked.

numFields The number of fields associated with the space definition.

Remarks

Use the tibasSpaceDef_GetNumFields() function to return the number of fields associated with a specified space definition.

See Also

tibasSpaceDef_PutFieldDef()

tibasSpaceDef_GetIndex()

Retrieves the index fields defined for a specified index.

Declaration

tibas_status tibasSpaceDef_GetIndex(

tibasSpaceDef spaceDef, const char* indexName, tibasStringList* fieldNames)

Parameters

Parameter Description

spaceDef The TIBCO ActiveSpaces entity on which the function is invoked.

indexName The name of the index.

fieldNames Returns one or more index fields, separated by commas.

Remarks

Use the tibasSpaceDef_GetIndex() function to return a list of the index fields defined for a specified index in a specified space definition.

The fieldNames parameter returns a list comma-separated field names.

See Also

tibasSpaceDef_AddIndexDef(), tibasSpaceDef_GetIndexDef(), tibasSpaceDef_GetIndexDefs()

tibasSpaceDef_RemoveIndexDef()

Removes a specified index for a specified spaceDef.

Declaration

tibas_status tibasSpaceDef_RemoveIndexDef(

tibasSpaceDef spaceDef, char* indexName)

Parameters

Parameter Description

spaceDef Specify the spaceDef object for the space definition for which you want to remove an index.

indexName Specify the name for the index that you want to remove.

Remarks

Use the tibasSpaceDef_RemoveIndexDef() function to remove a specified index in a specified space definition.

After you have removed the index definition, you can use the tibasIndexDef functions to add a new index or to alter the fields in the index.

See Also

tibasSpaceDef_GetIndex()

tibasSpaceDef_GetContext()

Used to retrieve a context tuple. Returns the context tuple associated with the SpaceDef.

Declaration

tibas_status tibasSpaceDef_GetContext

(tibasSpaceDef spaceDef, tibasTuple* context)

Parameters

Parameter Description

spaceDef Specify the spaceDef for which you need to retrieve the context information.

context Returns the context information associated with the space definition.

tibasSpaceDef_SetContext()

Used to set a context tuple. Specifies a tuple that contains context information for a specified SpaceDef.

Declaration

tibas_status tibasSpaceDef_SetContext (tibasSpaceDef spaceDef, tibasTuple context)

Parameters

Parameter Description

spaceDef Specify the spaceDef for which you need to set the context information.

context A tuple that contains context information.

tibasSpaceDef_GetMinSeederCount()

Gets from the SpaceDef the minimum number of seeders that has been specified for the space to be ready.

Declaration

tibas_status tibasSpaceDef_GetMinSeederCount(

tibasSpaceDef spaceDef, tibas_int seederCount) )

Parameters

Parameter Description

spaceDef The TIBCO ActiveSpaces entity on which the function is invoked.

seederCount The minimum number of seeders required for the space to be ready. The default value is 1.

Remarks

Use the tibasSpaceDef_GetMinSeederCount() function to return the minimum seeder count value for a specified space.

If this attribute of the spaceDef is defined, it means that the space will not be usable until the required number of seeders have joined it. Since it is not possible to service any operation on a space until there is at least one seeder for it, there is always an implied default value of 1.

See Also

tibasSpaceDef_SetMinSeederCount()

tibasSpaceDef_SetMinSeederCount()

Sets the minimum number of seeders required for the space to be ready.

Declaration

tibas_status tibasSpaceDef_SetMinSeederCount(

tibasSpaceDef spaceDef, tibas_int seederCount) )

Parameters

Parameter Description

spaceDef The TIBCO ActiveSpaces entity on which the function is invoked.

Parameter Description

seederCount The minimum number of seeders required for the space to be ready. The default value is 1.

Remarks

Use the tibasSpaceDef_SetMinSeederCount() function to set the minimum seeder count value for a specified space.

If this attribute of the SpaceDef is defined, it means that the space will not be usable until the required number of seeders have joined it. Since it is not possible to service any operation on a space until there is at least one seeder for it, there is always an implied default value of 1.

See Also

tibasSpaceDef_GetMinSeederCount()

tibasSpaceDef_GetUpdateTransport()

Returns the transport setting used for transmitting updates to the data for a specified space.

Declaration

tibas_status tibasSpaceDef_GetUpdateTransport(

tibasSpaceDef spaceDef,

tibas_updateTransport* updateTransport)

Parameters

Parameter Description

spaceDef The TIBCO ActiveSpaces entity on which the function is invoked.

updateTransport Returns the value of the update transport setting for the space. Can be one of the following:

在文檔中 TIBCO ActiveSpaces (頁 101-105)

相關文件