OmniHub#
Functions#
- OmniClientRequestId omniClientBlockCacheGetClose(const uint64_t *handles, uint64_t handlesCount, void *userData, OmniClientBlockCacheGetCloseCallback callback)
Closes blocks that were open for read. Clients should call this function with the handles returned from get_open. Failing to call this function could leave a block marked as "in-use", prevent the block from being garbage collected.
- OmniClientRequestId omniClientBlockCacheGetOpen(const uint8_t *const *keys, const uint16_t *keyLengths, uint64_t keyCount, uint64_t timeoutUs, void *userData, OmniClientBlockCacheGetOpenCallback callback)
Opens a block to be read. Clients should first call this function to get the location of the block, then read the data from the returned block location, then call omniClientBlockCacheGetClose when done reading.
- OmniClientRequestId omniClientBlockCachePutAbort(const uint64_t *handles, uint64_t handlesCount, void *userData, OmniClientBlockCachePutAbortCallback callback)
Closes blocks that failed to be written. Clients should call this function with the handles returned from put_open for all blocks that were opened but not written. This function will remove the block entry so the block can be rewritten.
- OmniClientRequestId omniClientBlockCachePutCommit(const uint64_t *handles, uint64_t handlesCount, void *userData, OmniClientBlockCachePutCommitCallback callback)
Closes blocks that were written successfully. Clients should call this function with the handles returned from put_open for all blocks that were written successfully. Blocks will not be available for read until this function returns.
- OmniClientRequestId omniClientBlockCachePutOpen(const struct OmniClientPutRequest *blocks, uint64_t blockCount, void *userData, OmniClientBlockCachePutOpenCallback callback)
Opens a block to be stored. Clients should first call this function to get the location to store the block, then write the data to the returned block location, then call omniClientBlockCachePutCommit if the write was successful, or omniClientBlockCachePutAbort to indicate the write failed.
- OmniClientRequestId omniClientBlockCacheStat(const uint8_t *const *keys, const uint16_t *keyLengths, uint64_t keyCount, uint64_t timeoutUs, void *userData, OmniClientBlockCacheStatCallback callback)
Stats a block to see if it exists and returns information about it if it does.
- OmniClientRequestId omniClientGetOmniHubHttpUri(void *userData, OmniClientGetOmniHubHttpUriCallback callback)
Get the HTTP diagnostic URI for OmniHub.
- OmniClientRequestId omniClientGetOmniHubVersion(void *userData, OmniClientGetOmniHubVersionCallback callback)
Check the version of the OmniHub.
Structs#
- OmniClientBlockCacheStatResult
The result of the stat operation for each block.
- OmniClientBlockLocation
Represents the location of a block in the database.
- OmniClientBlockMetadata
Metadata about each block.
- OmniClientBlockResult
Result of an 'open' request for a block.
- OmniClientPutRequest
Information about a single block in a put request.
Typedefs#
- OmniClientBlockCacheGetCloseCallback
Callback for omniClientBlockCacheGetClose.
- OmniClientBlockCacheGetOpenCallback
Callback for omniClientBlockCacheGetOpen.
- OmniClientBlockCachePutAbortCallback
Callback for omniClientBlockCachePutAbort.
- OmniClientBlockCachePutCommitCallback
Callback for omniClientBlockCachePutCommit.
- OmniClientBlockCachePutOpenCallback
Callback for omniClientBlockCachePutOpen.
- OmniClientBlockCacheStatCallback
Callback for omniClientBlockCacheStat.
- OmniClientGetOmniHubHttpUriCallback
Called with the result of omniClientGetOmniHubHttpUri .
- OmniClientGetOmniHubVersionCallback
Called with the result of omniClientGetOmniHubVersion .
Functions#
- OmniClientRequestId omniClientBlockCacheGetClose(
- const uint64_t *handles,
- uint64_t handlesCount,
- void *userData,
- OmniClientBlockCacheGetCloseCallback callback,
Closes blocks that were open for read. Clients should call this function with the handles returned from get_open. Failing to call this function could leave a block marked as “in-use”, prevent the block from being garbage collected.
- Parameters:
handles – The handles to close. These handles were returned by get_open
handlesCount – Number of handles provided
userData – User data passed to the callback
callback – The callback function to register
- Returns:
A request ID that can be used with omniClientStop
- OmniClientRequestId omniClientBlockCacheGetOpen(
- const uint8_t *const *keys,
- const uint16_t *keyLengths,
- uint64_t keyCount,
- uint64_t timeoutUs,
- void *userData,
- OmniClientBlockCacheGetOpenCallback callback,
Opens a block to be read. Clients should first call this function to get the location of the block, then read the data from the returned block location, then call omniClientBlockCacheGetClose when done reading.
- Parameters:
keys – The keys to get data for
keyLengths – Array of lengths for each key
keyCount – Number of keys provided
timeoutUs – If this value is non-zero, the operation will check if the block is currently being put, and if so, it will block for up to the provided number of microseconds waiting for the put to finish. If the put finishes in time, this get operation will open the block. If the put does not finish, this get operation will return eOmniClientResult_ErrorLocked for the block. If the provided timeout is 0, the call will not block, and will immediately return eOmniClientResult_ErrorLocked if the requested block is being put. The timeout value applies to all keys in the batch request.
userData – User data passed to the callback
callback – The callback function to register
- Returns:
A request ID that can be used with omniClientStop
- OmniClientRequestId omniClientBlockCachePutAbort(
- const uint64_t *handles,
- uint64_t handlesCount,
- void *userData,
- OmniClientBlockCachePutAbortCallback callback,
Closes blocks that failed to be written. Clients should call this function with the handles returned from put_open for all blocks that were opened but not written. This function will remove the block entry so the block can be rewritten.
- Parameters:
handles – The handles to close. These handles were returned by put_open
handlesCount – Number of handles provided
userData – User data passed to the callback
callback – The callback function to register
- Returns:
A request ID that can be used with omniClientStop
- OmniClientRequestId omniClientBlockCachePutCommit(
- const uint64_t *handles,
- uint64_t handlesCount,
- void *userData,
- OmniClientBlockCachePutCommitCallback callback,
Closes blocks that were written successfully. Clients should call this function with the handles returned from put_open for all blocks that were written successfully. Blocks will not be available for read until this function returns.
- Parameters:
handles – The handles to close. These handles were returned by put_open
handlesCount – Number of handles provided
userData – User data passed to the callback
callback – The callback function to register
- Returns:
A request ID that can be used with omniClientStop
- OmniClientRequestId omniClientBlockCachePutOpen(
- const struct OmniClientPutRequest *blocks,
- uint64_t blockCount,
- void *userData,
- OmniClientBlockCachePutOpenCallback callback,
Opens a block to be stored. Clients should first call this function to get the location to store the block, then write the data to the returned block location, then call omniClientBlockCachePutCommit if the write was successful, or omniClientBlockCachePutAbort to indicate the write failed.
- Parameters:
blocks – The blocks to be stored
blockCount – Number of blocks to be stored
userData – User data passed to the callback
callback – The callback function to register
- Returns:
A request ID that can be used with omniClientStop
- OmniClientRequestId omniClientBlockCacheStat(
- const uint8_t *const *keys,
- const uint16_t *keyLengths,
- uint64_t keyCount,
- uint64_t timeoutUs,
- void *userData,
- OmniClientBlockCacheStatCallback callback,
Stats a block to see if it exists and returns information about it if it does.
- Parameters:
keys – The keys to stat
keyLengths – Array of lengths for each key
keyCount – Number of keys provided
timeoutUs – If this value is non-zero, the operation will check if the block is currently being put, and if so, it will block for up to the provided number of microseconds waiting for the put to finish. If the put finishes in time, this stat operation will return the metadata of the block. If the put does not finish, this stat operation will return eOmniClientResult_ErrorLocked for the block. If the provided timeout is 0, the call will not block, and will immediately return eOmniClientResult_ErrorLocked if the requested block is being put. The timeout value applies to all keys in the batch request.
userData – User data passed to the callback
callback – The callback function to register
- Returns:
A request ID that can be used with omniClientStop
- OmniClientRequestId omniClientGetOmniHubHttpUri(
- void *userData,
- OmniClientGetOmniHubHttpUriCallback callback,
Get the HTTP diagnostic URI for OmniHub.
- Parameters:
userData – User data passed to the callback
callback – The callback function to register
- Returns:
A request ID that can be used with omniClientStop
- OmniClientRequestId omniClientGetOmniHubVersion(
- void *userData,
- OmniClientGetOmniHubVersionCallback callback,
Check the version of the OmniHub.
- Parameters:
userData – User data passed to the callback
callback – The callback function to register
- Returns:
A request ID that can be used with omniClientStop
Typedefs#
-
typedef void (*OmniClientBlockCacheGetCloseCallback)(void *userData, OmniClientResult result, const OmniClientResult *results, uint64_t resultsCount)#
Callback for omniClientBlockCacheGetClose.
- Param userData:
The userData provided to the function
- Param result:
The overall result of the operation.
- Param results:
The results for each block in the request. If result != eOmniClientResult_Ok, this will be a null pointer. The pointer is only valid for the duration of the callback and should be copied to be used later.
- Param resultsCount:
The number of results in results. If result != eOmniClientResult_Ok, this will be 0.
-
typedef void (*OmniClientBlockCacheGetOpenCallback)(void *userData, OmniClientResult result, const struct OmniClientBlockResult *blocks, uint64_t blockCount)#
Callback for omniClientBlockCacheGetOpen.
- Param userData:
The userData provided to the function
- Param result:
The overall result of the operation.
- Param blocks:
The results for each block in the request. If result != eOmniClientResult_Ok, this will be a null pointer. The pointer is only valid for the duration of the callback and should be copied to be used later.
- Param blockCount:
The number of blocks in blocks. If result != eOmniClientResult_Ok, this will be 0.
-
typedef void (*OmniClientBlockCachePutAbortCallback)(void *userData, OmniClientResult result, const OmniClientResult *results, uint64_t resultsCount)#
Callback for omniClientBlockCachePutAbort.
- Param userData:
The userData provided to the function
- Param result:
The overall result of the operation.
- Param results:
The results for each block in the request. If result != eOmniClientResult_Ok, this will be a null pointer. The pointer is only valid for the duration of the callback and should be copied to be used later.
- Param resultsCount:
The number of results in results. If result != eOmniClientResult_Ok, this will be 0.
-
typedef void (*OmniClientBlockCachePutCommitCallback)(void *userData, OmniClientResult result, const OmniClientResult *results, uint64_t resultsCount)#
Callback for omniClientBlockCachePutCommit.
- Param userData:
The userData provided to the function
- Param result:
The overall result of the operation.
- Param results:
The results for each block in the request. If result != eOmniClientResult_Ok, this will be a null pointer. The pointer is only valid for the duration of the callback and should be copied to be used later.
- Param resultsCount:
The number of results in results. If result != eOmniClientResult_Ok, this will be 0.
-
typedef void (*OmniClientBlockCachePutOpenCallback)(void *userData, OmniClientResult result, const struct OmniClientBlockResult *blocks, uint64_t blockCount)#
Callback for omniClientBlockCachePutOpen.
- Param userData:
The userData provided to the function
- Param result:
The overall result of the operation.
- Param blocks:
The results for each block in the request. If result != eOmniClientResult_Ok, this will be a null pointer. The pointer is only valid for the duration of the callback and should be copied to be used later.
- Param blockCount:
The number of blocks in blocks. If result != eOmniClientResult_Ok, this will be 0.
-
typedef void (*OmniClientBlockCacheStatCallback)(void *userData, OmniClientResult result, const struct OmniClientBlockCacheStatResult *metadata, uint64_t metadataCount)#
Callback for omniClientBlockCacheStat.
- Param userData:
The userData provided to the function
- Param result:
The overall result of the operation.
- Param metadata:
The results for each block in the request. If result != eOmniClientResult_Ok, this will be a null pointer. The pointer is only valid for the duration of the callback and should be copied to be used later.
- Param metadataCount:
The number of items in metadata. If result != eOmniClientResult_Ok, this will be 0.
-
typedef void (*OmniClientGetOmniHubHttpUriCallback)(void *userData, OmniClientResult result, char const *uri)#
Called with the result of omniClientGetOmniHubHttpUri.
-
typedef void (*OmniClientGetOmniHubVersionCallback)(void *userData, OmniClientResult result, char const *version)#
Called with the result of omniClientGetOmniHubVersion.