Shared Persistent Heap Data Environment Manual  1.1.0
sasindex.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2005-2014 IBM Corporation.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation, Steven Munroe - initial API and implementation
10  */
11 
12 
13 #ifndef __SAS_INDEX_H
14 #define __SAS_INDEX_H
15 
16 #include "sasindexkey.h"
17 #include "sasindexnode.h"
18 
109 typedef void *SASIndex_t;
110 
111 #ifdef __cplusplus
112 #define __C__ "C"
113 #else
114 #define __C__
115 #endif
116 
127 extern __C__ SASIndex_t
128 SASIndexFixedCreate (block_size_t block_size);
129 
142 extern __C__ SASIndex_t
144 
156 extern __C__ SASIndex_t
157 SASIndexCreatePageSize (block_size_t block_size, block_size_t page_size);
158 
170 extern __C__ SASIndex_t
171 SASIndexCreate (block_size_t block_size);
172 
182 extern __C__ void
184 
198 extern __C__ long
200 
217 extern __C__ long
219 
234 extern __C__ SASIndexKey_t *
236 
254 extern __C__ SASIndexKey_t *
256 
271 extern __C__ SASIndexKey_t *
273 
291 extern __C__ SASIndexKey_t *
293 
305 extern __C__ int
307 
323 extern __C__ int
325 
340 extern __C__ void *
341 SASIndexGet (SASIndex_t btree, SASIndexKey_t * key);
342 
360 extern __C__ void *
362 
372 extern __C__ int
374 
387 extern __C__ int
389 
406 extern __C__ int
407 SASIndexPut (SASIndex_t btree, SASIndexKey_t * key, void *value);
408 
428 extern __C__ int
429 SASIndexPut_nolock (SASIndex_t btree, SASIndexKey_t * key, void *value);
430 
447 extern __C__ void *
448 SASIndexReplace (SASIndex_t btree, SASIndexKey_t * key, void *value);
449 
469 extern __C__ void *
470 SASIndexReplace_nolock (SASIndex_t btree, SASIndexKey_t * key, void *value);
471 
488 extern __C__ void *
490 
510 extern __C__ void *
512 
529 extern __C__ SASIndex_t
530 SASIndexInit (void *btree_block, block_size_t btree_size,
531  block_size_t page_size, int expanding);
532 
541 extern __C__ block_size_t
543 
553 extern __C__ block_size_t
555 
556 #endif /* __SAS_INDEX_H */
__C__ SASIndexKey_t * SASIndexGetMaxKey(SASIndex_t btree)
Return the maximum key string from btree.
__C__ SASIndexKey_t * SASIndexGetMaxKey_nolock(SASIndex_t btree)
Return the maximum key string from btree.
__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.
__C__ void * SASIndexRemove(SASIndex_t btree, SASIndexKey_t *key)
Remove the key key and its associated value from SAS B-Tree btree.
__C__ int SASIndexContainsKey(SASIndex_t btree, SASIndexKey_t *key)
Return true if the SAS B-Tree btree contains the key key.
__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...
__C__ void * SASIndexRemove_nolock(SASIndex_t btree, SASIndexKey_t *key)
Remove the key key and its associated value from SAS B-Tree btree.
__C__ SASIndexKey_t * SASIndexGetMinKey(SASIndex_t btree)
Return the minimum key string from btree.
__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...
#define __C__
ignore this macro behind the curtain
Definition: sasmsync.h:32
void * SASIndex_t
Handle to an instance of binary index B-tree.
Definition: sasindex.h:109
__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.
__C__ block_size_t SASIndexFreeSpace(SASIndex_t btree)
Return the total available node free space for btree.
__C__ long SASIndexGetModCount(SASIndex_t btree)
Return the number or insert/replace/remove operations performed on btree.
__C__ void * SASIndexGet(SASIndex_t btree, SASIndexKey_t *key)
Return the memory address value associated with key in SAS B-Tree btree.
Index Key Handle structure for binary index B-trees.
Definition: sasindexkey.h:59
__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...
__C__ block_size_t SASIndexAllocSize(SASIndex_t btree)
Return the page size used for node allocation for btree.
__C__ SASIndexKey_t * SASIndexGetMinKey_nolock(SASIndex_t btree)
Return the minimum key string from btree.
__C__ int SASIndexIsEmpty(SASIndex_t btree)
Return true if the SAS B-Tree btree is empty.
API for defining binary Index keys for B-Trees.
__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.
__C__ int SASIndexIsEmpty_nolock(SASIndex_t btree)
Return true if the SAS B-Tree btree is empty.
__C__ void SASIndexDestroy(SASIndex_t btree)
Destroy the SAS B-Tree btree.
__C__ SASIndex_t SASIndexFixedCreate(block_size_t block_size)
Create a fixed SAS B-Tree of block_size size capacity.
__C__ int SASIndexContainsKey_nolock(SASIndex_t btree, SASIndexKey_t *key)
Return true if the SAS B-Tree btree contains the key key.
__C__ SASIndex_t SASIndexExpandCreate(SASIndex_t btree)
Internal function that creates new block of B-Tree nodes for an expanding SAS B-Tree btree...
__C__ long SASIndexGetModCount_nolock(SASIndex_t btree)
Return the number or insert/replace/remove operations performed on btree.
__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.
__C__ void * SASIndexGet_nolock(SASIndex_t btree, SASIndexKey_t *key)
Return the memory address value associated with key in SAS B-Tree btree.