libjf API reference guide

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

jf_recind_seq.h File Reference

#include <jf/jf_config.h>
#include <jf/jf_recind_list.h>
#include <jf/jf_trace.h>

Go to the source code of this file.

Data Structures

struct  jf_recind_seq_t

Defines

#define JF_TRACE_MODULE   JF_TRACE_MOD_LIB_RECIND_SEQ

Functions

int jf_recind_seq_add (jf_recind_seq_t *ris, const jf_recind_list_t *elem)
void jf_recind_seq_create (jf_recind_seq_t *ris)
void jf_recind_seq_destroy (jf_recind_seq_t *ris)
const jf_recind_list_tjf_recind_seq_get_elem (const jf_recind_seq_t *ris, size_t pos)
size_t jf_recind_seq_get_size (const jf_recind_seq_t *ris)
int jf_recind_seq_is_safe (const jf_recind_seq_t *ris)
void jf_recind_seq_reset (jf_recind_seq_t *ris)


Define Documentation

#define JF_TRACE_MODULE   JF_TRACE_MOD_LIB_RECIND_SEQ
 

Definition at line 41 of file jf_recind_seq.h.


Function Documentation

int jf_recind_seq_add jf_recind_seq_t ris,
const jf_recind_list_t elem
 

Add an element to a record index sequence object

Parameters:
ris IN/OUT record index sequence object
elem IN element must be added to sequence
Returns:
a reason code
Definition at line 64 of file jf_recind_seq.c.

References jf_recind_seq_t::array, CATCH, JF_RC_INTERNAL_ERROR, JF_RC_OBJ_CORRUPTED, JF_RC_OK, JF_RC_REALLOC_ERROR, jf_recind_seq_is_safe(), JF_TRACE, jf_recind_seq_t::size, and THROW.

Referenced by jf_journal_cold_recovery_update_lists().

void jf_recind_seq_create jf_recind_seq_t ris  )  [inline, static]
 

Create a new object of type jf_recind_seq_t

Parameters:
ris OUT record index sequence object
Definition at line 81 of file jf_recind_seq.h.

References jf_recind_seq_reset().

Referenced by jf_recind_pool_create().

void jf_recind_seq_destroy jf_recind_seq_t ris  ) 
 

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

Parameters:
ris IN/OUT record index sequence object
Definition at line 45 of file jf_recind_seq.c.

References jf_recind_seq_t::array, jf_offset_t, jf_recind_list_destroy(), jf_recind_seq_is_safe(), jf_recind_seq_reset(), JF_TRACE, and jf_recind_seq_t::size.

Referenced by jf_recind_pool_destroy().

const jf_recind_list_t* jf_recind_seq_get_elem const jf_recind_seq_t ris,
size_t  pos
[inline, static]
 

Retrieve the reference to an element stored in the object

Parameters:
ris IN record index sequence object
pos IN position of the interesting element
Returns:
the reference to element at position "pos" or NULL if pos is out of range [0,size-1]
Definition at line 136 of file jf_recind_seq.h.

References jf_recind_seq_t::array, and jf_recind_seq_t::size.

Referenced by jf_journal_cold_recovery_patch_seq().

size_t jf_recind_seq_get_size const jf_recind_seq_t ris  )  [inline, static]
 

Retrieve the number of lists stored in the object

Parameters:
ris IN record index sequence object
Returns:
number of lists stored
Definition at line 123 of file jf_recind_seq.h.

References jf_recind_seq_t::size.

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

int jf_recind_seq_is_safe const jf_recind_seq_t ris  )  [inline, static]
 

Is object safe?

Parameters:
ris IN record index sequence object
Returns:
TRUE, FALSE
Definition at line 101 of file jf_recind_seq.h.

References jf_recind_seq_t::array, and jf_recind_seq_t::size.

Referenced by jf_recind_seq_add(), and jf_recind_seq_destroy().

void jf_recind_seq_reset jf_recind_seq_t ris  ) 
 

Reset a jf_recind_seq_t object

Parameters:
ris OUT record index sequence object
Definition at line 36 of file jf_recind_seq.c.

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

Referenced by jf_recind_seq_create(), and jf_recind_seq_destroy().


Copyright 2005 © Tiian