libjf API reference guide

Main Page | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

jf_recind_pool.h File Reference

#include <jf/jf_config.h>
#include <jf/jf_recind_seq.h>

Go to the source code of this file.

Data Structures

struct  jf_recind_pool_t

Defines

#define JF_TRACE_MODULE   JF_TRACE_MOD_LIB_RECIND_POOL

Functions

int jf_recind_pool_create (jf_recind_pool_t *rip, size_t size)
void jf_recind_pool_destroy (jf_recind_pool_t *rip)
jf_recind_seq_tjf_recind_pool_get_seq (const jf_recind_pool_t *rip, jf_word_t id)
jf_word_t jf_recind_pool_get_size (const jf_recind_pool_t *rip)
int jf_recind_pool_is_safe (const jf_recind_pool_t *rip)
void jf_recind_pool_reset (jf_recind_pool_t *rip)


Define Documentation

#define JF_TRACE_MODULE   JF_TRACE_MOD_LIB_RECIND_POOL
 

Definition at line 38 of file jf_recind_pool.h.


Function Documentation

int jf_recind_pool_create jf_recind_pool_t rip,
size_t  size
 

Create a new object of type jf_recind_pool_t

Parameters:
rip OUT record index pool object
size IN number of sequences will be stored in the pool (# of sequences = # of journaled files)
Returns:
a reason code
Definition at line 45 of file jf_recind_pool.c.

References jf_recind_pool_t::array, CATCH, JF_RC_INTERNAL_ERROR, JF_RC_MALLOC_ERROR, JF_RC_OK, jf_recind_pool_reset(), jf_recind_seq_create(), JF_TRACE, jf_recind_pool_t::size, and THROW.

Referenced by jf_journal_cold_recovery(), and jf_journal_cold_recovery_prep_pool().

void jf_recind_pool_destroy jf_recind_pool_t rip  ) 
 

Destroy an object of type jf_recind_pool_t NOTE: the object MUST be created calling jf_recind_pool_create before this method can be invoked

Parameters:
rip IN/OUT record index pool object
Definition at line 84 of file jf_recind_pool.c.

References jf_recind_pool_t::array, jf_offset_t, jf_recind_pool_is_safe(), jf_recind_pool_reset(), jf_recind_seq_destroy(), JF_TRACE, and jf_recind_pool_t::size.

Referenced by jf_journal_cold_recovery(), and jf_journal_cold_recovery_prep_pool().

jf_recind_seq_t* jf_recind_pool_get_seq const jf_recind_pool_t rip,
jf_word_t  id
[inline, static]
 

Retrieve i-th record index sequence stored in pool

Parameters:
rip IN record index pool object
id IN identifier of the sequence in the pool
Returns:
a reference to desired sequence or NULL if id is not valid
Definition at line 112 of file jf_recind_pool.h.

References jf_recind_pool_t::array, jf_word_t, and jf_recind_pool_t::size.

Referenced by jf_journal_cold_recovery(), jf_journal_cold_recovery_patch(), and jf_journal_cold_recovery_update_lists().

jf_word_t jf_recind_pool_get_size const jf_recind_pool_t rip  )  [inline, static]
 

Retrieve the number of record index sequences stored in the object

Parameters:
rip IN record index pool object
Returns:
number of indexes stored
Definition at line 126 of file jf_recind_pool.h.

References jf_word_t, and jf_recind_pool_t::size.

Referenced by jf_journal_cold_recovery_patch().

int jf_recind_pool_is_safe const jf_recind_pool_t rip  )  [inline, static]
 

Is object safe?

Parameters:
rip IN record index pool object
Returns:
TRUE, FALSE
Definition at line 100 of file jf_recind_pool.h.

References jf_recind_pool_t::array, and jf_recind_pool_t::size.

Referenced by jf_recind_pool_destroy().

void jf_recind_pool_reset jf_recind_pool_t rip  ) 
 

Reset a jf_recind_pool_t object

Parameters:
rip OUT record index sequence object
Definition at line 36 of file jf_recind_pool.c.

References jf_recind_pool_t::array, JF_TRACE, and jf_recind_pool_t::size.

Referenced by jf_recind_pool_create(), and jf_recind_pool_destroy().


Copyright 2005 © Tiian