|
Packit Service |
310c69 |
/*
|
|
Packit Service |
310c69 |
* Copyright (c) 2020 Red Hat, Inc.
|
|
Packit Service |
310c69 |
*
|
|
Packit Service |
310c69 |
* This program is free software; you can redistribute it and/or
|
|
Packit Service |
310c69 |
* modify it under the terms of the GNU General Public License
|
|
Packit Service |
310c69 |
* as published by the Free Software Foundation; either version 2
|
|
Packit Service |
310c69 |
* of the License, or (at your option) any later version.
|
|
Packit Service |
310c69 |
*
|
|
Packit Service |
310c69 |
* This program is distributed in the hope that it will be useful,
|
|
Packit Service |
310c69 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit Service |
310c69 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
Packit Service |
310c69 |
* GNU General Public License for more details.
|
|
Packit Service |
310c69 |
*
|
|
Packit Service |
310c69 |
* You should have received a copy of the GNU General Public License
|
|
Packit Service |
310c69 |
* along with this program; if not, write to the Free Software
|
|
Packit Service |
310c69 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
|
Packit Service |
310c69 |
* 02110-1301, USA.
|
|
Packit Service |
310c69 |
*
|
|
Packit Service |
310c69 |
* $Id: //eng/uds-releases/jasper/src/uds/indexInternals.h#3 $
|
|
Packit Service |
310c69 |
*/
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
#ifndef INDEX_INTERNALS_H
|
|
Packit Service |
310c69 |
#define INDEX_INTERNALS_H
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
#include "index.h"
|
|
Packit Service |
310c69 |
#include "loadType.h"
|
|
Packit Service |
310c69 |
#include "request.h"
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**
|
|
Packit Service |
310c69 |
* Construct a new index from the given configuration.
|
|
Packit Service |
310c69 |
*
|
|
Packit Service |
310c69 |
* @param layout The index layout to use
|
|
Packit Service |
310c69 |
* @param config The configuration to use
|
|
Packit Service |
310c69 |
* @param userParams The index session parameters. If NULL, the default
|
|
Packit Service |
310c69 |
* session parameters will be used.
|
|
Packit Service |
310c69 |
* @param zoneCount The number of zones for this index to use
|
|
Packit Service |
310c69 |
* @param loadType How to create the index: it can be create only, allow
|
|
Packit Service |
310c69 |
* loading from files, and allow rebuilding from the volume
|
|
Packit Service |
310c69 |
* @param newIndex A pointer to hold a pointer to the new index
|
|
Packit Service |
310c69 |
*
|
|
Packit Service |
310c69 |
* @return UDS_SUCCESS or an error code
|
|
Packit Service |
310c69 |
**/
|
|
Packit Service |
310c69 |
int allocateIndex(IndexLayout *layout,
|
|
Packit Service |
310c69 |
const Configuration *config,
|
|
Packit Service |
310c69 |
const struct uds_parameters *userParams,
|
|
Packit Service |
310c69 |
unsigned int zoneCount,
|
|
Packit Service |
310c69 |
LoadType loadType,
|
|
Packit Service |
310c69 |
Index **newIndex)
|
|
Packit Service |
310c69 |
__attribute__((warn_unused_result));
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**
|
|
Packit Service |
310c69 |
* Clean up the index and its memory.
|
|
Packit Service |
310c69 |
*
|
|
Packit Service |
310c69 |
* @param index The index to destroy.
|
|
Packit Service |
310c69 |
**/
|
|
Packit Service |
310c69 |
void releaseIndex(Index *index);
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
#endif /* INDEX_INTERNALS_H */
|