sasindex.h
Go to the documentation of this file.
/*
* Copyright (c) 2005-2014 IBM Corporation.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation, Steven Munroe - initial API and implementation
*/
#ifndef __SAS_INDEX_H
#define __SAS_INDEX_H
#include "sasindexkey.h"
#include "sasindexnode.h"
typedef void *SASIndex_t;
#ifdef __cplusplus
#define __C__ "C"
#else
#define __C__
#endif
extern __C__ SASIndex_t
SASIndexFixedCreate (block_size_t block_size);
extern __C__ SASIndex_t
SASIndexExpandCreate (SASIndex_t btree);
extern __C__ SASIndex_t
SASIndexCreatePageSize (block_size_t block_size, block_size_t page_size);
extern __C__ SASIndex_t
SASIndexCreate (block_size_t block_size);
extern __C__ void
SASIndexDestroy (SASIndex_t btree);
extern __C__ long
SASIndexGetModCount (SASIndex_t btree);
extern __C__ long
SASIndexGetModCount_nolock (SASIndex_t btree);
extern __C__ SASIndexKey_t *
SASIndexGetMaxKey (SASIndex_t btree);
extern __C__ SASIndexKey_t *
SASIndexGetMaxKey_nolock (SASIndex_t btree);
extern __C__ SASIndexKey_t *
SASIndexGetMinKey (SASIndex_t btree);
extern __C__ SASIndexKey_t *
SASIndexGetMinKey_nolock (SASIndex_t btree);
extern __C__ int
SASIndexContainsKey (SASIndex_t btree, SASIndexKey_t * key);
extern __C__ int
SASIndexContainsKey_nolock (SASIndex_t btree, SASIndexKey_t * key);
extern __C__ void *
SASIndexGet (SASIndex_t btree, SASIndexKey_t * key);
extern __C__ void *
SASIndexGet_nolock (SASIndex_t btree, SASIndexKey_t * key);
extern __C__ int
SASIndexIsEmpty (SASIndex_t btree);
extern __C__ int
SASIndexIsEmpty_nolock (SASIndex_t btree);
extern __C__ int
SASIndexPut (SASIndex_t btree, SASIndexKey_t * key, void *value);
extern __C__ int
SASIndexPut_nolock (SASIndex_t btree, SASIndexKey_t * key, void *value);
extern __C__ void *
SASIndexReplace (SASIndex_t btree, SASIndexKey_t * key, void *value);
extern __C__ void *
SASIndexReplace_nolock (SASIndex_t btree, SASIndexKey_t * key, void *value);
extern __C__ void *
SASIndexRemove (SASIndex_t btree, SASIndexKey_t * key);
extern __C__ void *
SASIndexRemove_nolock (SASIndex_t btree, SASIndexKey_t * key);
extern __C__ SASIndex_t
SASIndexInit (void *btree_block, block_size_t btree_size,
block_size_t page_size, int expanding);
extern __C__ block_size_t
SASIndexAllocSize (SASIndex_t btree);
extern __C__ block_size_t
SASIndexFreeSpace (SASIndex_t btree);
#endif /* __SAS_INDEX_H */
SASIndexGetMinKey_nolock
__C__ SASIndexKey_t * SASIndexGetMinKey_nolock(SASIndex_t btree)
Return the minimum key string from btree.
SASIndexFixedCreate
__C__ SASIndex_t SASIndexFixedCreate(block_size_t block_size)
Create a fixed SAS B-Tree of block_size size capacity.
SASIndexAllocSize
__C__ block_size_t SASIndexAllocSize(SASIndex_t btree)
Return the page size used for node allocation for btree.
SASIndexGetMaxKey_nolock
__C__ SASIndexKey_t * SASIndexGetMaxKey_nolock(SASIndex_t btree)
Return the maximum key string from btree.
SASIndexIsEmpty
__C__ int SASIndexIsEmpty(SASIndex_t btree)
Return true if the SAS B-Tree btree is empty.
SASIndexGetMaxKey
__C__ SASIndexKey_t * SASIndexGetMaxKey(SASIndex_t btree)
Return the maximum key string from btree.
SASIndexPut
__C__ int SASIndexPut(SASIndex_t btree, SASIndexKey_t *key, void *value)
Add a new element value with key key in the SAS B-Tree btree.
SASIndexCreate
__C__ SASIndex_t SASIndexCreate(block_size_t block_size)
Create a new expanding SAS B-Tree with initial heap_size size and default page_size for nodes.
SASIndexGet
__C__ void * SASIndexGet(SASIndex_t btree, SASIndexKey_t *key)
Return the memory address value associated with key in SAS B-Tree btree.
SASIndexGetModCount_nolock
__C__ long SASIndexGetModCount_nolock(SASIndex_t btree)
Return the number or insert/replace/remove operations performed on btree.
SASIndexGetModCount
__C__ long SASIndexGetModCount(SASIndex_t btree)
Return the number or insert/replace/remove operations performed on btree.
SASIndexReplace
__C__ void * SASIndexReplace(SASIndex_t btree, SASIndexKey_t *key, void *value)
Replace the associated value of the element with key key in SAS B-Tree btree with the value value.
SASIndexDestroy
__C__ void SASIndexDestroy(SASIndex_t btree)
Destroy the SAS B-Tree btree.
SASIndexCreatePageSize
__C__ SASIndex_t SASIndexCreatePageSize(block_size_t block_size, block_size_t page_size)
Create a new expanding SAS B-Tree with heap_size size and page_size node size.
SASIndexIsEmpty_nolock
__C__ int SASIndexIsEmpty_nolock(SASIndex_t btree)
Return true if the SAS B-Tree btree is empty.
SASIndexContainsKey_nolock
__C__ int SASIndexContainsKey_nolock(SASIndex_t btree, SASIndexKey_t *key)
Return true if the SAS B-Tree btree contains the key key.
SASIndexInit
__C__ SASIndex_t SASIndexInit(void *btree_block, block_size_t btree_size, block_size_t page_size, int expanding)
Internal function to initialize storage as a B-tree.
SASIndexExpandCreate
__C__ SASIndex_t SASIndexExpandCreate(SASIndex_t btree)
Internal function that creates new block of B-Tree nodes for an expanding SAS B-Tree btree.
SASIndexGetMinKey
__C__ SASIndexKey_t * SASIndexGetMinKey(SASIndex_t btree)
Return the minimum key string from btree.
SASIndexReplace_nolock
__C__ void * SASIndexReplace_nolock(SASIndex_t btree, SASIndexKey_t *key, void *value)
Replace the associated value of the element with key key in SAS B-Tree btree with the value value.
SASIndexRemove_nolock
__C__ void * SASIndexRemove_nolock(SASIndex_t btree, SASIndexKey_t *key)
Remove the key key and its associated value from SAS B-Tree btree.
SASIndexGet_nolock
__C__ void * SASIndexGet_nolock(SASIndex_t btree, SASIndexKey_t *key)
Return the memory address value associated with key in SAS B-Tree btree.
SASIndexRemove
__C__ void * SASIndexRemove(SASIndex_t btree, SASIndexKey_t *key)
Remove the key key and its associated value from SAS B-Tree btree.
SASIndexFreeSpace
__C__ block_size_t SASIndexFreeSpace(SASIndex_t btree)
Return the total available node free space for btree.
SASIndex_t
void * SASIndex_t
Handle to an instance of binary index B-tree.
Definition: sasindex.h:109
SASIndexPut_nolock
__C__ int SASIndexPut_nolock(SASIndex_t btree, SASIndexKey_t *key, void *value)
Add a new element value with key key in the SAS B-Tree btree.
SASIndexContainsKey
__C__ int SASIndexContainsKey(SASIndex_t btree, SASIndexKey_t *key)
Return true if the SAS B-Tree btree contains the key key.
sasindexkey.h
API for defining binary Index keys for B-Trees.
__C__
#define __C__
ignore this macro behind the curtain
Definition: sasmsync.h:32
SASIndexKey_t
Index Key Handle structure for binary index B-trees.
Definition: sasindexkey.h:60