ss_m::lid(SSM )

Shore Programmer's Manual - 2 August 96

NAME

link_to_remote_id, convert_to_local_id, lfid_of_lrid, set_lid_cache_enable, lid_cache_enabled \- Class ss_m Methods for Logical ID Operations

SYNOPSIS

#include <sm_vas.h>  // which includes sm.h

static rc_t                 link_to_remote_id(
    const lvid_t&               local_lvid,
    serial_t&                   local_serial,
    const lvid_t&               remote_lvid,
    const serial_t&             remote_serial);

static rc_t                 convert_to_local_id(
    const lvid_t&               remote_v,
    const serial_t&             remote_s,
    lvid_t&                     local_v, 
    serial_t&                   local_s);

static rc_t                 set_lid_cache_enable(bool enable);
static rc_t                 lid_cache_enabled(bool& enabled);


DESCRIPTION

The SSM provides methods for using logical IDs and controlling the caching of mappings between logical and physical IDs.

Creating and Using Remote IDs

As noted in the discussion of identifiers in the SSM interface document, there are two types of serial numbers, local (intra-volume references) and remote (inter-volume references). The SSM converts logical IDs to physical locations on a volume. On each volume is a logical ID index mapping serial numbers to the location of the object identified by the serial number. When a volume ID and serial number pair is given in an SSM method, the SSM lookups the serial number in the logical ID index. If the serial number is local it will refer to a location on the volume where the lookup is done. If the serial number is remote, the lookup will return another volume ID and serial number. This new volume is the volume where the object actually resides and the serial number for the object on that volume.

link_to_remote_id(local_lvid, local_serial, remote_lvid, remote_serial)

The link_to_remote_id method generates and returns a new remote serial number, local_serial, on volume, local_lvid, that is a link to a serial number, remote_serial, on another volume, remote_lvid.

convert_to_local_id(remote_v, remote_s, local_v, local_s)

The convert_to_local_id method converts a remote serial number, remote_s, on volume, remote_v, to the local serial number of the referenced object, local_s, on the volume where it resides, local_v.

Logical ID Cache Control

Results from lookup's performed on the logical ID mapping index are usually cached. For debugging and performance evaluation, this cache can be enabled or disabled.

set_lid_cache_enable(enable)

The set_lid_cache_enable method turns on the use of the cache when, enable is true and off when enable is false.

lid_cache_enabled(enabled)

The lid_cache_enabled method returns, in enabled, the current state of the cache.

ERRORS

See errors(ssm) for more information on error handling.

EXAMPLES

To Do.

VERSION

This manual page applies to Version 1.0 of theShore software.

SPONSORSHIP

The Shore project is sponsored by the Advanced Research Project Agency, ARPA order number 018 (formerly 8230), monitored by the U.S. Army Research Laboratory under contract DAAB07-92-C-Q508.

COPYRIGHT

Copyright (c) 1994, 1995, 1996 Computer Sciences Department, University of Wisconsin -- Madison. All Rights Reserved.

SEE ALSO

lid_t(common) , serial_t(common) , intro(ssm) .