CUBRID Engine  latest
locator_cl.h File Reference
#include "config.h"
#include "error_manager.h"
#include "work_space.h"
#include "storage_common.h"
#include "locator.h"
#include "replication.h"
Include dependency graph for locator_cl.h:

Go to the source code of this file.

Classes

struct  list_mops
 

Macros

#define ONE_MFLUSH   true
 
#define MANY_MFLUSHES   false
 
#define DECACHE   true
 
#define DONT_DECACHE   false
 
#define OID_BATCH_SIZE   2000
 
#define LC_INSERT_OPERATION_TYPE(p)
 
#define LC_UPDATE_OPERATION_TYPE(p)
 

Typedefs

typedef struct list_mops LIST_MOPS
 
typedef void(* LC_OIDMAP_CALLBACK) (LC_OIDMAP *map)
 

Enumerations

enum  LC_OBJTYPE { LC_OBJECT, LC_CLASS, LC_INSTANCE }
 

Functions

bool locator_is_root (MOP mop)
 
int locator_is_class (MOP mop, DB_FETCH_MODE hint_purpose)
 
LOCK locator_fetch_mode_to_lock (DB_FETCH_MODE purpose, LC_OBJTYPE type, LC_FETCH_VERSION_TYPE fetch_version_type)
 
int locator_get_cache_coherency_number (MOP mop)
 
MOBJ locator_fetch_object (MOP mop, DB_FETCH_MODE purpose, LC_FETCH_VERSION_TYPE fetch_version_type)
 
MOBJ locator_fetch_class (MOP class_mop, DB_FETCH_MODE purpose)
 
MOBJ locator_fetch_class_of_instance (MOP inst_mop, MOP *class_mop, DB_FETCH_MODE purpose)
 
MOBJ locator_fetch_instance (MOP mop, DB_FETCH_MODE purpose, LC_FETCH_VERSION_TYPE fetch_version_type)
 
MOBJ locator_fetch_set (int num_mops, MOP *mop_set, DB_FETCH_MODE inst_purpose, DB_FETCH_MODE class_purpose, int quit_on_errors)
 
MOBJ locator_fetch_nested (MOP mop, DB_FETCH_MODE purpose, int prune_level, int quit_on_errors)
 
int locator_flush_class (MOP class_mop)
 
int locator_flush_instance (MOP mop)
 
int locator_flush_all_instances (MOP class_mop, bool decache)
 
int locator_flush_for_multi_update (MOP class_mop)
 
int locator_all_flush (void)
 
int locator_repl_flush_all (void)
 
MOP locator_add_class (MOBJ classobj, const char *classname)
 
MOP locator_add_instance (MOBJ instance, MOP class_mop)
 
MOP locator_add_root (OID *root_oid, MOBJ class_root)
 
int locator_remove_class (MOP class_mop)
 
void locator_remove_instance (MOP mop)
 
MOBJ locator_update_instance (MOP mop)
 
MOBJ locator_update_class (MOP mop)
 
int locator_update_tree_classes (MOP *classes_mop_set, int num_classes)
 
MOBJ locator_prepare_rename_class (MOP class_mop, const char *old_classname, const char *new_classname)
 
OIDlocator_assign_permanent_oid (MOP mop)
 
MOP locator_find_class (const char *classname)
 
MOP locator_find_class_with_purpose (const char *classname, bool for_update)
 
LC_FIND_CLASSNAME locator_lockhint_classes (int num_classes, const char **many_classnames, LOCK *many_locks, int *need_subclasses, LC_PREFETCH_FLAGS *flags, int quit_on_errors, LOCK lock_rr_tran)
 
int locator_does_exist_object (MOP mop, DB_FETCH_MODE purpose)
 
LIST_MOPSlocator_get_all_mops (MOP class_mop, DB_FETCH_MODE class_purpose, LC_FETCH_VERSION_TYPE *force_fetch_version_type)
 
LIST_MOPSlocator_get_all_class_mops (DB_FETCH_MODE purpose, int(*fun)(MOBJ class_obj))
 
void locator_free_list_mops (LIST_MOPS *mops)
 
void locator_synch_isolation_incons (void)
 
void locator_set_sig_interrupt (int set)
 
MOBJ locator_create_heap_if_needed (MOP class_mop, bool reuse_oid)
 
MOBJ locator_has_heap (MOP class_mop)
 
LC_OIDMAPlocator_add_oidset_object (LC_OIDSET *oidset, DB_OBJECT *obj)
 
int locator_assign_oidset (LC_OIDSET *oidset, LC_OIDMAP_CALLBACK callback)
 
int locator_assign_all_permanent_oids (void)
 
int locator_decache_all_lock_instances (MOP class_mop)
 
int locator_get_append_lsa (struct log_lsa *lsa)
 
int locator_flush_replication_info (REPL_INFO *repl_info)
 
LC_FIND_CLASSNAME locator_reserve_class_name (const char *class_name, OID *class_oid)
 

Macro Definition Documentation

#define MANY_MFLUSHES   false
#define OID_BATCH_SIZE   2000

Definition at line 51 of file locator_cl.h.

Referenced by ldr_assign_all_perm_oids(), and locator_add_to_oidset_when_temp_oid().

#define ONE_MFLUSH   true

Definition at line 45 of file locator_cl.h.

Referenced by locator_flush_class(), and locator_internal_flush_instance().

Typedef Documentation

typedef void(* LC_OIDMAP_CALLBACK) (LC_OIDMAP *map)

Definition at line 130 of file locator_cl.h.

typedef struct list_mops LIST_MOPS

Definition at line 63 of file locator_cl.h.

Enumeration Type Documentation

enum LC_OBJTYPE
Enumerator
LC_OBJECT 
LC_CLASS 
LC_INSTANCE 

Definition at line 70 of file locator_cl.h.

Function Documentation

MOP locator_add_instance ( MOBJ  instance,
MOP  class_mop 
)
LC_OIDMAP* locator_add_oidset_object ( LC_OIDSET oidset,
DB_OBJECT obj 
)
MOP locator_add_root ( OID root_oid,
MOBJ  class_root 
)
int locator_assign_all_permanent_oids ( void  )
int locator_decache_all_lock_instances ( MOP  class_mop)

Definition at line 3293 of file locator_cl.c.

References ER_FAILED, locator_decache_lock(), NO_ERROR, NULL, ws_map_class(), and WS_MAP_SUCCESS.

Referenced by locator_cache_not_have_object(), locator_cache_object_class(), and unloaddb().

Here is the caller graph for this function:

MOBJ locator_fetch_class_of_instance ( MOP  inst_mop,
MOP class_mop,
DB_FETCH_MODE  purpose 
)

Definition at line 2354 of file locator_cl.c.

References LC_CLASS, locator_fetch_mode_to_lock(), locator_lock_class_of_instance(), NO_ERROR, NULL, TM_TRAN_READ_FETCH_VERSION, ws_find(), and WS_FIND_MOP_DELETED.

Referenced by fetch_class().

Here is the caller graph for this function:

MOBJ locator_fetch_nested ( MOP  mop,
DB_FETCH_MODE  purpose,
int  prune_level,
int  quit_on_errors 
)
MOBJ locator_fetch_object ( MOP  mop,
DB_FETCH_MODE  purpose,
LC_FETCH_VERSION_TYPE  fetch_version_type 
)

Definition at line 2235 of file locator_cl.c.

References LC_CLASS, LC_INSTANCE, LC_OBJECT, locator_fetch_mode_to_lock(), locator_is_root(), locator_lock(), NO_ERROR, NULL, ws_class_mop(), ws_find(), and WS_FIND_MOP_DELETED.

Referenced by cursor_fetch_oids(), and locator_is_class().

Here is the caller graph for this function:

MOP locator_find_class ( const char *  classname)
MOP locator_find_class_with_purpose ( const char *  classname,
bool  for_update 
)

Definition at line 3167 of file locator_cl.c.

References LC_CLASS, LC_CLASSNAME_EXIST, locator_fetch_mode_to_lock(), locator_find_class_by_name(), NULL, SCH_M_LOCK, and SCH_S_LOCK.

Referenced by sm_find_class_with_purpose().

Here is the caller graph for this function:

int locator_flush_replication_info ( REPL_INFO repl_info)

Definition at line 6869 of file locator_cl.c.

References repl_set_info().

Referenced by do_replicate_statement().

Here is the caller graph for this function:

LIST_MOPS* locator_get_all_class_mops ( DB_FETCH_MODE  purpose,
int(*)(MOBJ class_obj)  fun 
)

Definition at line 2861 of file locator_cl.c.

References locator_fun_get_all_mops(), NULL, and sm_Root_class_mop.

Referenced by db_get_all_chosen_classes(), and do_reclaim_class_addresses().

Here is the caller graph for this function:

LIST_MOPS* locator_get_all_mops ( MOP  class_mop,
DB_FETCH_MODE  class_purpose,
LC_FETCH_VERSION_TYPE force_fetch_version_type 
)
int locator_get_append_lsa ( struct log_lsa lsa)

Definition at line 6882 of file locator_cl.c.

References repl_log_get_append_lsa().

Referenced by extract_objects().

Here is the caller graph for this function:

MOBJ locator_prepare_rename_class ( MOP  class_mop,
const char *  old_classname,
const char *  new_classname 
)
void locator_remove_instance ( MOP  mop)

Definition at line 5916 of file locator_cl.c.

References ws_mark_deleted().

Referenced by obj_delete().

Here is the caller graph for this function:

int locator_repl_flush_all ( void  )
LC_FIND_CLASSNAME locator_reserve_class_name ( const char *  class_name,
OID class_oid 
)

Definition at line 179 of file locator_cl.c.

References locator_reserve_class_names().

Referenced by db_create_class(), db_create_vclass(), dbt_reserve_name(), and locator_add_root().

Here is the caller graph for this function:

void locator_set_sig_interrupt ( int  set)

Definition at line 193 of file locator_cl.c.

References lc_Is_siginterrupt, and log_set_interrupt().

Referenced by db_set_interrupt().

Here is the caller graph for this function:

void locator_synch_isolation_incons ( void  )

Definition at line 6171 of file locator_cl.c.

References locator_cache(), locator_free_copy_area(), locator_notify_isolation_incons(), NULL, TM_TRAN_ISOLATION, TRAN_REPEATABLE_READ, and TRAN_SERIALIZABLE.

Referenced by db_synchronize_cache().

Here is the caller graph for this function:

MOBJ locator_update_class ( MOP  mop)

Definition at line 5938 of file locator_cl.c.

References DB_FETCH_WRITE, locator_fetch_class(), NULL, and ws_dirty().

Referenced by allocate_disk_structures(), fetch_class(), install_new_representation(), sm_drop_index(), and sm_exist_index().

Here is the caller graph for this function:

MOBJ locator_update_instance ( MOP  mop)

Definition at line 6035 of file locator_cl.c.

References DB_FETCH_WRITE, LC_FETCH_MVCC_VERSION, locator_fetch_instance(), locator_lock_set(), locator_update_tree_classes(), NULL, SCH_M_LOCK, ws_dirty(), and X_LOCK.

Referenced by fetch_instance().

Here is the caller graph for this function:

int locator_update_tree_classes ( MOP classes_mop_set,
int  num_classes 
)

Referenced by locator_update_instance().

Here is the caller graph for this function: