GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  DBM::DEEP::ENGINE::FILE (3)

.ds Aq ’

NAME

DBM::Deep::Engine::File - engine for use with DBM::Deep::Storage::File

CONTENTS

PURPOSE

This is the engine for use with DBM::Deep::Storage::File.

EXTERNAL METHODS

new()

This takes a set of args. These args are described in the documentation for new in DBM::Deep.

INTERNAL METHODS

The following methods are internal-use-only to DBM::Deep::Engine::File.

read_txn_slots()

This takes no arguments.

This will return an array with a 1 or 0 in each slot. Each spot represents one available transaction. If the slot is 1, that transaction is taken. If it is 0, the transaction is available.

write_txn_slots( CW@slots )

This takes an array of 1’s and 0’s. This array represents the transaction slots returned by read_txn_slots(). In other words, the following is true:



  @x = read_txn_slots( write_txn_slots( @x ) );



(With the obviously missing object referents added back in.)

get_running_txn_ids()

This takes no arguments.

This will return an array of taken transaction IDs. This wraps read_txn_slots().

get_txn_staleness_counter( CW$trans_id )

This will return the staleness counter for the given transaction ID. Please see STALENESS in DBM::Deep::Engine for more information.

inc_txn_staleness_counter( CW$trans_id )

This will increment the staleness counter for the given transaction ID. Please see STALENESS in DBM::Deep::Engine for more information.

get_entries()

This takes no arguments.

This returns a list of all the sectors that have been modified by this transaction.

add_entry( CW$trans_id, CW$location )

This takes a transaction ID and a file location and marks the sector at that location as having been modified by the transaction identified by $trans_id.

This returns nothing.

<B>NOTEB>: Unlike all the other _entries() methods, there are several cases where $trans_id != $self->trans_id for this method.

reindex_entry( CW$old_loc, CW$new_loc )

This takes two locations (old and new, respectively). If a location that has been modified by this transaction is subsequently reindexed due to a bucketlist overflowing, then the entries hash needs to be made aware of this change.

This returns nothing.

clear_entries()

This takes no arguments. It will clear the entries list for the running transaction.

This returns nothing.

_write_file_header()

This writes the file header for a new file. This will write the various settings that set how the file is interpreted.

_read_file_header()

This reads the file header from an existing file. This will read the various settings that set how the file is interpreted.

_apply_digest( CW@stuff )

This will apply the digest method (default to Digest::MD5::md5) to the arguments passed in and return the result.

_add_free_blist_sector( CW$offset, CW$size )

_add_free_data_sector( CW$offset, CW$size )

_add_free_index_sector( CW$offset, CW$size )

These methods are all wrappers around _add_free_sector(), providing the proper chain offset ($multiple) for the sector type.

_add_free_sector( CW$multiple, CW$offset, CW$size )

_add_free_sector() takes the offset into the chains location, the offset of the sector, and the size of that sector. It will mark the sector as a free sector and put it into the list of sectors that are free of this type for use later.

This returns nothing.

<B>NOTEB>: $size is unused?

_request_blist_sector( CW$size )

_request_data_sector( CW$size )

_request_index_sector( CW$size )

These methods are all wrappers around _request_sector(), providing the proper chain offset ($multiple) for the sector type.

_request_sector( CW$multiple CW$size )

This takes the offset into the chains location and the size of that sector.

This returns the object with the sector. If there is an available free sector of that type, then it will be reused. If there isn’t one, then a new one will be allocated.

    ACCESSORS

The following are readonly attributes.
o byte_size
o hash_size
o hash_chars
o num_txns
o max_buckets
o blank_md5
o data_sector_size
o txn_bitfield_len
The following are read/write attributes.
o trans_id / set_trans_id( $new_id )
o trans_loc / set_trans_loc( $new_loc )
o chains_loc / set_chains_loc( $new_loc )

_dump_file()

This method takes no arguments. It’s used to print out a textual representation of the DBM::Deep DB file. It assumes the file is not-corrupted.
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 DBM::DEEP::ENGINE::FILE (3) 2014-01-13

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.