[+/-]
Tablespace
ConstructorTablespace::getName()
Tablespace::getExtentSize()
Tablespace::getAutoGrowSpecification()
Tablespace::getDefaultLogfileGroup()
Tablespace::getDefaultLogfileGroupId()
Tablespace::getObjectStatus()
Tablespace::getObjectVersion()
Tablespace::getObjectId()
Tablespace::setName()
Tablespace::setExtentSize()
Tablespace::setAutoGrowSpecification()
Tablespace::setDefaultLogfileGroup()
Abstract
This section provides details of the public members of the NDB
API's Tablespace
class.
Description.
These methods are used to create a new instance of
Tablespace
, or to copy an existing one.
The NdbDictionary::Dictionary
class also
supplies methods for creating and dropping tablespaces. See
Section 2.3.3, “The Dictionary
Class”.
Signatures. New instance:
Tablespace ( void )
Copy constructor:
Tablespace
(
const Tablespace& tablespace
)
Parameters.
New instance: None. Copy constructor: a
reference tablespace
to an existing
Tablespace
instance.
Return value.
A Tablespace
object.
Destructor.
The class defines a virtual destructor
~Tablespace()
which takes no arguments and
returns no value.
Description. This method retrieves the name of the tablespace.
Signature.
const char* getName ( void ) const
Parameters. None.
Return value. The name of the tablespace, a string value (as a character pointer).
Description. This method is used to retrieve the extent size — that is the size of the memory allocation units — used by the tablespace.
The same extent size is used for all datafiles contained in a given tablespace.
Signature.
Uint32 getExtentSize ( void ) const
Parameters. None.
Return value. The tablespace's extent size in bytes, as an unsigned 32-bit integer.
Description.
Signature.
const AutoGrowSpecification& getAutoGrowSpecification ( void ) const
Parameters. None.
Return value.
A reference to the structure which describes the tablespace
auto-grow characteristics — for details, see
Section 2.3.26, “The AutoGrowSpecification
Structure”.
Description. This method retrieves the name of the tablespace's default logfile group.
Alternatively, you may wish to obtain the ID of the default
logfile group — see
Section 2.3.22.1.6, “Tablespace::getDefaultLogfileGroupId()
”.
Signature.
const char* getDefaultLogfileGroup ( void ) const
Parameters. None.
Return value. The name of the logfile group (string value as character pointer).
Description. This method retrieves the ID of the tablespace's default logfile group.
You can also obtain directly the name of the default logfile
group rather than its ID — see
Section 2.3.22.1.5, “Tablespace::getDefaultLogfileGroup()
”.
Signature.
Uint32 getDefaultLogfileGroupId ( void ) const
Parameters. None.
Return value. The ID of the logfile group, as an unsigned 32-bit integer.
Description. This method is used to retrieve the object status of a tablespace.
Signature.
virtual Object::Status getObjectStatus ( void ) const
Parameters. None.
Return value.
An Object::Status
value — see
Section 2.3.20.1.3, “The Object::Status
Type”, for details.
Description. This method gets the tablespace object version.
Signature.
virtual int getObjectVersion ( void ) const
Parameters. None.
Return value. The object version, as an integer.
Description. This method retrieves the tablespace's object ID.
Signature.
virtual int getObjectId ( void ) const
Parameters. None.
Return value. The object ID, as an integer.
Description. This method sets the name of the tablespace.
Signature.
void setName
(
const char* name
) const
Parameters.
The name
of the tablespace, a
string (character pointer).
Return value. None.
Description. This method sets the tablespace's extent size.
Signature.
void setExtentSize
(
Uint32 size
)
Parameters.
The size
to be used for this
tablespace's extents, in bytes.
Return value. None.
Description. This method is used to set the auto-grow characteristics of the tablespace.
Signature.
void setAutoGrowSpecification
(
const AutoGrowSpecification& autoGrowSpec
)
Parameters.
This method takes a single parameter, an
AutoGrowSpecification
data structure. See
Section 2.3.26, “The AutoGrowSpecification
Structure”.
Return value. None.
Description. This method is used to set a tablespace's default logfile group.
Signature. This method can be called in two different ways. The first of these uses the name of the logfile group, as shown here:
void setDefaultLogfileGroup
(
const char* name
)
This method can also be called by passing it a reference to a
LogfileGroup
object:
void setDefaultLogfileGroup
(
const class LogfileGroup& lGroup
)
There is no method for setting a logfile group as the default
for a tablespace by referencing the logfile group's ID. (In
other words, there is no
set
method
corresponding to
*
()getDefaultLogfileGroupId()
.)
Parameters.
Either the name
of the logfile
group to be assigned to the tablespace, or a reference
lGroup
to this logfile group.
Return value. None.