FSEG-SPI
FLAM Segment Store Exit (FSEG) Service Provider Interface (SPI) Version: 5.2.1-42969
Function codes

Function codes passed to the FSEG provider as the third parameter. More...

Macros

#define FSEG_FUNC_OPN   1U
 Open storage / connect to archive namespace. Requires prior FSEG_FUNC_NEW (*ppHdl must not be NULL). State transition: NEW -> OPEN.
#define FSEG_FUNC_CLS   2U
 Close / disconnect from storage. The provider handle is not freed; the handle returns to NEW state. The provider must write statistics into TsFsegCls before returning. State transition: OPEN -> NEW.
#define FSEG_FUNC_PUT   3U
 Store a segment (integer key -> blob). OPEN state only.
#define FSEG_FUNC_GET   4U
 Retrieve a segment by integer key (locate, no copy). OPEN state only.
#define FSEG_FUNC_DEL   5U
 Delete a segment by integer key. OPEN state only.
#define FSEG_FUNC_EXS   6U
 Check archive or segment existence. In NEW state (called via SEGSSE exists()): check whether the archive namespace itself exists; TsFsegExs.siSegInd is ignored and the provider opens a temporary connection. In OPEN state (called via SEGSSE checksegment()): check whether the segment at TsFsegExs.siSegInd exists in the open archive.
#define FSEG_FUNC_GMN   7U
 Get the main (root) segment index. OPEN state only.
#define FSEG_FUNC_SMN   8U
 Set the main (root) segment index. OPEN state only.
#define FSEG_FUNC_VLS   9U
 List all versions of the archive. OPEN state only.
#define FSEG_FUNC_DVS   10U
 Delete a specific version of the archive. OPEN state only.
#define FSEG_FUNC_DAR   11U
 Delete the entire archive (all versions). NEW state only. The provider opens a temporary connection, performs the deletion, and closes before returning.
#define FSEG_FUNC_PRN   12U
 Prune old versions, keeping a configurable number. NEW state only. Same self-managed connection pattern as DAR.
#define FSEG_FUNC_CBF   13U
 Create a write buffer (batch hint for the provider). OPEN state only.
#define FSEG_FUNC_FLB   14U
 Flush a write buffer to permanent storage. OPEN state only.
#define FSEG_FUNC_NEW   16U
 Allocate a provider handle and store the archive name and parameter string. No storage I/O is performed. State transition: EMPTY -> NEW. *ppHdl must be NULL on entry; the provider writes the new handle address to *ppHdl.
#define FSEG_FUNC_FRE   17U
 Free the provider handle. No storage I/O is performed. Must be called in NEW state (*ppHdl != NULL, storage closed). State transition: NEW -> EMPTY. The provider must set *ppHdl to NULL.

Detailed Description

Function codes passed to the FSEG provider as the third parameter.

The function code determines which member of TuFsegPar is active. Only the union member that corresponds to the current function code may be read or written; accessing any other member is undefined behavior.

Macro Definition Documentation

◆ FSEG_FUNC_CBF

#define FSEG_FUNC_CBF   13U

Create a write buffer (batch hint for the provider). OPEN state only.

◆ FSEG_FUNC_CLS

#define FSEG_FUNC_CLS   2U

Close / disconnect from storage. The provider handle is not freed; the handle returns to NEW state. The provider must write statistics into TsFsegCls before returning. State transition: OPEN -> NEW.

◆ FSEG_FUNC_DAR

#define FSEG_FUNC_DAR   11U

Delete the entire archive (all versions). NEW state only. The provider opens a temporary connection, performs the deletion, and closes before returning.

◆ FSEG_FUNC_DEL

#define FSEG_FUNC_DEL   5U

Delete a segment by integer key. OPEN state only.

◆ FSEG_FUNC_DVS

#define FSEG_FUNC_DVS   10U

Delete a specific version of the archive. OPEN state only.

◆ FSEG_FUNC_EXS

#define FSEG_FUNC_EXS   6U

Check archive or segment existence. In NEW state (called via SEGSSE exists()): check whether the archive namespace itself exists; TsFsegExs.siSegInd is ignored and the provider opens a temporary connection. In OPEN state (called via SEGSSE checksegment()): check whether the segment at TsFsegExs.siSegInd exists in the open archive.

◆ FSEG_FUNC_FLB

#define FSEG_FUNC_FLB   14U

Flush a write buffer to permanent storage. OPEN state only.

◆ FSEG_FUNC_FRE

#define FSEG_FUNC_FRE   17U

Free the provider handle. No storage I/O is performed. Must be called in NEW state (*ppHdl != NULL, storage closed). State transition: NEW -> EMPTY. The provider must set *ppHdl to NULL.

◆ FSEG_FUNC_GET

#define FSEG_FUNC_GET   4U

Retrieve a segment by integer key (locate, no copy). OPEN state only.

◆ FSEG_FUNC_GMN

#define FSEG_FUNC_GMN   7U

Get the main (root) segment index. OPEN state only.

◆ FSEG_FUNC_NEW

#define FSEG_FUNC_NEW   16U

Allocate a provider handle and store the archive name and parameter string. No storage I/O is performed. State transition: EMPTY -> NEW. *ppHdl must be NULL on entry; the provider writes the new handle address to *ppHdl.

◆ FSEG_FUNC_OPN

#define FSEG_FUNC_OPN   1U

Open storage / connect to archive namespace. Requires prior FSEG_FUNC_NEW (*ppHdl must not be NULL). State transition: NEW -> OPEN.

◆ FSEG_FUNC_PRN

#define FSEG_FUNC_PRN   12U

Prune old versions, keeping a configurable number. NEW state only. Same self-managed connection pattern as DAR.

◆ FSEG_FUNC_PUT

#define FSEG_FUNC_PUT   3U

Store a segment (integer key -> blob). OPEN state only.

◆ FSEG_FUNC_SMN

#define FSEG_FUNC_SMN   8U

Set the main (root) segment index. OPEN state only.

◆ FSEG_FUNC_VLS

#define FSEG_FUNC_VLS   9U

List all versions of the archive. OPEN state only.