Class: TSingleBinStorageMechanism

Declaration: BasicDocumentStorage.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TStorageMechanism

Inherited By:

None.

Purpose:

TSingleBinStorageMechanism is a TStorageMechanism derived class which adds the API to manage a single storage bin.

Instantiation:

TSingleBinStorageMechanism is an abstract base class and only instantiated as part of a derived class.

Deriving Classes:

This is an abstract base class. Derived classes must implement the protocol defined by this class. Derived classes must override the pure virtual functions: CreateStorageBin, DeleteStorageBin, DoesStorageBinExist, OpenStorageBin, and CloseStorageBin. TDOSStorageMechanism is a possible derived class using DOS file system entities.

Concurrency:

Multithread safe. Concurrency among threads within a team is provided by the shared hidden master. Concurrency between teams is provided by the underlying service used to implement the storage mechanism. In both cases, the semantics of multiple readers, or single writer will be enforced.

Resource Use:

TSingleBinStorageMechanism is abstract and always created and deleted as part of a derived class.

Member Function: TSingleBinStorageMechanism::~TSingleBinStorageMechanism

virtual ~ TSingleBinStorageMechanism ()

Interface Category:

API.

Purpose:

Destructor.

Calling Context:

Called to destroy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TSingleBinStorageMechanism::CreateStorageBin

virtual void CreateStorageBin ()

Interface Category:

API.

Purpose:

Creates an underlying physical storage implementation of the storage bin.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws TDocumentException::kDocumentStoreBinAlreadyExists.

Concurrency:

Multithread safe.

Other Considerations:

This function is a pure virtual function and must be overridden by classes deriving from TSingleBinStorageMechanism. Preconditions: Assertion (an underlying physical storage implementation of the storage mechanism exists). Assertion (an underlying physical storage implementation of the storage bin does not exist). Postconditions: Assertion (an underlying physical storage implementation of the storage bin exists).

Member Function: TSingleBinStorageMechanism::DeleteStorageBin

virtual void DeleteStorageBin ()

Interface Category:

API.

Purpose:

Deletes an underlying physical storage implementation of the storage bin.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws TDocumentException::kDocumentStoreBinDoesNotExist.

Concurrency:

Multithread safe.

Other Considerations:

This function is a pure virtual function and must be overridden by classes deriving from TSingleBinStorageMechanism. Preconditions: Assertion (an underlying physical storage implementation of the storage mechanism exists). Assertion (an underlying physical storage implementation of the storage bin exists). Postconditions: Assertion (an underlying physical storage implementation of the storage bin no longer exists).

Member Function: TSingleBinStorageMechanism::DoesStorageBinExist

virtual bool DoesStorageBinExist ()

Interface Category:

API.

Purpose:

Checks whether an underlying physical storage implementation of the storage bin exists.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns true if an underlying physical storage implementation exists; false otherwise.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

This function is a pure virtual function and must be overridden by classes deriving from TSingleBinStorageMechanism. Preconditions: Assertion (an underlying physical storage implementation of the storage mechanism exists).

Member Function: TSingleBinStorageMechanism::OpenStorageBin

virtual TRandomAccessStream* OpenStorageBin (EAccessMode mode)

Interface Category:

API.

Purpose:

Opens the storage bin.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns a random-access stream for accessing the storage bin.

Exceptions:

Throws TDocumentException::kDocumentStoreBinAccessDenied.

Concurrency:

Multithread safe.

Other Considerations:

This function is a pure virtual function and must be overridden by classes deriving from TSingleBinStorageMechanism. Preconditions: Assertion (an underlying physical storage implementation of the storage mechanism exists). Assertion (an underlying physical storage implementation of the storage bin exists). Postconditions: Assertion (storage bin is opened with specified access mode).

Member Function: TSingleBinStorageMechanism::CloseStorageBin

virtual void CloseStorageBin ()

Interface Category:

API.

Purpose:

Closes the storage bin.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws TDocumentException::kDocumentStoreBinDoesNotExist.

Concurrency:

Multithread safe.

Other Considerations:

This function is a pure virtual function and must be overridden by classes deriving from TSingleBinStorageMechanism. Preconditions: Assertion (an underlying physical storage implementation of the storage mechanism exists). Assertion (an underlying physical storage implementation of the storage bin exists). Postconditions: Assertion (storage bin is closed).

Member Function: TSingleBinStorageMechanism::TSingleBinStorageMechanism

  1. TSingleBinStorageMechanism ()
  2. TSingleBinStorageMechanism (const TSingleBinStorageMechanism &)

Interface Category:

API.

Purpose:

  1. Default constructor. Used to resurrect a flattened storage mechanism.
  2. Copy constructor.

Calling Context:

  1. Called by the stream-in operators and derived class constructors.
  2. Called to copy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

TSingleBinStorageMechanism is an abstract base class--all the constructors are protected. Do not instantiate this class.

Member Function: TSingleBinStorageMechanism::operator=

TSingleBinStorageMechanism & operator =(const TSingleBinStorageMechanism &)

Interface Category:

API.

Purpose:

Assignment operator.

Calling Context:

Called when an object is assigned to another compatible object.

Parameters:

Return Value:

A non-const reference to the left-hand side object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

TSingleBinStorageMechanism is an abstract base class--all the constructors are protected. Do not instantiate this class.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.