2.3.3 The Datafile Class

2.3.3.1 Datafile Methods

Abstract

This section covers the Datafile class.

Parent class.  Object

Child classes.  None

Description.  The Datafile class models a Cluster Disk Data datafile, which is used to store Disk Data table data.

Note

Currently, only unindexed column data can be stored on disk. Indexes and indexed columns are stored in memory.

MySQL Cluster prior to MySQL 5.1 did not support Disk Data storage and so did not support datafiles; thus the Datafile class is unavailable for NDB API applications written against these older releases.

Methods.  The following table lists the public methods of this class and the purpose or use of each method:

MethodPurpose / Use
Datafile()Class constructor
~Datafile()Destructor
getFileNo()Gets the number of the datafile in the tablespace
getFree()Gets the amount of free space in the datafile
getNode()Gets the ID of the node where the datafile is located
getObjectId()Gets the datafile's object ID
getObjectStatus()Gets the datafile's object status
getObjectVersion()Gets the datafile's object version
getPath()Gets the file system path to the datafile
getSize()Gets the size of the datafile
getTablespace()Gets the name of the tablespace to which the datafile belongs
getTablespaceId()Gets the ID of the tablespace to which the datafile belongs
setNode()Sets the Cluster node where the datafile is to be located
setPath()Sets the name and location of the datafile on the file system
setSize()Sets the datafile's size
setTablespace()Sets the tablespace to which the datafile belongs

For detailed descriptions, signatures, and examples of use for each of these methods, see Section 2.3.3.1, “Datafile Methods”.

Types.  The Datafile class defines no public types.

Class diagram.  This diagram shows all the available methods of the Datafile class:

Public methods of the Datafile class.