[+/-]
Datafile
Class ConstructorDatafile::getPath()
Datafile::getSize()
Datafile::getFree()
Datafile::getTablespace()
Datafile::getTablespaceId()
Datafile::getNode()
Datafile::getFileNo()
Datafile::getObjectStatus()
Datafile::getObjectVersion()
Datafile::getObjectId()
Datafile::setPath()
Datafile::setSize()
Datafile::setTablespace()
Datafile::setNode()
Abstract
This section provides descriptions of the public methods of the
Datafile
class.
Description.
This method creates a new instance of
Datafile
, or a copy of an existing one.
Signature. To create a new instance:
Datafile ( void )
To create a copy of an existing Datafile
instance:
Datafile
(
const Datafile& datafile
)
Parameters.
New instance: None. Copy constructor: a
reference to the Datafile
instance to be
copied.
Return value.
A Datafile
object.
Description. This method returns the file system path to the datafile.
Signature.
const char* getPath ( void ) const
Parameters. None.
Return value. The path to the datafile on the data node's file system, a string (character pointer).
Description. This method gets the size of the datafile in bytes.
Signature.
Uint64 getSize ( void ) const
Parameters. None.
Return value. The size of the data file, in bytes, as an unsigned 64-bit integer.
Description. This method gets the free space available in the datafile.
Signature.
Uint64 getFree ( void ) const
Parameters. None.
Return value. The number of bytes free in the datafile, as an unsigned 64-bit integer.
Description. This method can be used to obtain the name of the tablespace to which the datafile belongs.
You can also access the associated tablespace's ID directly.
See Section 2.3.2.1.6, “Datafile::getTablespaceId()
”.
Signature.
const char* getTablespace ( void ) const
Parameters. None.
Return value. The name of the associated tablespace (as a character pointer).
Description. This method gets the ID of the tablespace to which the datafile belongs.
You can also access the name of the associated tablespace
directly. See Section 2.3.2.1.5, “Datafile::getTablespace()
”.
Signature.
Uint32 getTablespaceId ( void ) const
Parameters. None.
Return value. The is method returns the tablespace ID as an unsigned 32-bit integer.
Description. This method retrieves the ID of the Cluster node on which the datafile resides.
Signature.
Uint32 getNode ( void ) const
Parameters. None.
Return value. The node ID as an unsigned 32-bit integer.
Description. This method gets the number of the file within the associated tablespace.
Signature.
Uint32 getFileNo ( void ) const
Parameters. None.
Return value. The file number, as an unsigned 32-bit integer.
Description. This method is used to obtain the datafile's object status.
Signature.
virtual Object::Status getObjectStatus ( void ) const
Parameters. None.
Return value.
The datafile's Status
. See
Section 2.3.20.1.3, “The Object::Status
Type”.
Description. This method retrieves the datafile's object version.
Signature.
virtual int getObjectVersion ( void ) const
Parameters. None.
Return value. The datafile's object version, as an integer.
Description. This method is used to obtain the object ID of the datafile.
Signature.
virtual int getObjectId ( void ) const
Parameters. None.
Return value. The datafile's object ID, as an integer.
Description. This method sets the path to the datafile on the data node's file system.
Signature.
const char* getPath ( void ) const
Parameters. The path to the file, a string (as a character pointer).
Return value. None.
Description. This method sets the size of the datafile.
Signature.
void setSize
(
Uint64 size
)
Parameters.
This method takes a single parameter — the desired
size
in bytes for the datafile, as
an unsigned 64-bit integer.
Return value. None.
Description. This method is used to associate the datafile with a tablespace.
Signatures.
setTablespace()
can be invoked with either
the name of the tablespace, as shown here:
void setTablespace
(
const char* name
)
Or with a reference to a Tablespace
object.
void setTablespace
(
const class Tablespace& tablespace
)
Parameters. This method takes a single parameter, which can be either one of the following:
The name
of the tablespace
(as a character pointer).
A reference tablespace
to the
corresponding Tablespace
object.
Return value. None.