2.3.38.1 Undofile Methods

2.3.38.1.1 Undofile Constructor
2.3.38.1.2 Undofile::getFileNo()
2.3.38.1.3 Undofile::getLogfileGroup()
2.3.38.1.4 Undofile::getLogfileGroupId()
2.3.38.1.5 Undofile::getNode()
2.3.38.1.6 Undofile::getObjectId()
2.3.38.1.7 Undofile::getObjectStatus()
2.3.38.1.8 Undofile::getObjectVersion()
2.3.38.1.9 Undofile::getPath()
2.3.38.1.10 Undofile::getSize()
2.3.38.1.11 Undofile::setLogfileGroup()
2.3.38.1.12 Undofile::setNode()
2.3.38.1.13 Undofile::setPath()
2.3.38.1.14 Undofile::setSize()

Abstract

This section details the public methods of the Undofile class.

2.3.38.1.1 Undofile Constructor

Description.  The class constructor can be used to create a new Undofile instance, or to copy an existing one.

Signatures.  Creates a new instance:

Undofile
    (
      void
    )

Copy constructor:

Undofile
    (
      const Undofile& undoFile
    )

Parameters.  New instance: None. The copy constructor takes a single argument—a reference to the Undofile object to be copied.

Return value.  An Undofile object.

Destructor.  The class defines a virtual destructor which takes no arguments and has the return type void.

2.3.38.1.2 Undofile::getFileNo()

Description.  The getFileNo() method gets the number of the undo file in the log file group to which it belongs.

Signature. 

Uint32 getFileNo
    (
      void
    ) const

Parameters.  None.

Return value.  The number of the undo file, as an unsigned 32-bit integer.

2.3.38.1.3 Undofile::getLogfileGroup()

Description.  This method retrieves the name of the log file group to which the undo file belongs.

Signature. 

const char* getLogfileGroup
    (
      void
    ) const

Parameters.  None.

Return value.  The name of the log file group, a string value (as a character pointer).

2.3.38.1.4 Undofile::getLogfileGroupId()

Description.  This method retrieves the ID of the log file group to which the undo file belongs.

Note

It is also possible to obtain the name of the log file group directly. See Section 2.3.38.1.3, “Undofile::getLogfileGroup()

Signature. 

Uint32 getLogfileGroupId
    (
      void
    ) const

Parameters.  None.

Return value.  The ID of the log file group, as an unsigned 32-bit integer.

2.3.38.1.5 Undofile::getNode()

Description.  This method is used to retrieve the node ID of the node where the undo file is located.

Signature. 

Uint32 getNode
    (
      void
    ) const

Parameters.  None.

Return value.  The node ID, as an unsigned 32-bit integer.

2.3.38.1.6 Undofile::getObjectId()

Description.  This method retrieves the undo file's object ID.

Signature. 

virtual int getObjectId
    (
      void
    ) const

Parameters.  None.

Return value.  The object ID, as an integer.

2.3.38.1.7 Undofile::getObjectStatus()

Description.  This method is used to retrieve the object status of an undo file.

Signature. 

virtual Object::Status getObjectStatus
    (
      void
    ) const

Parameters.  None.

Return value.  An Object::Status value.

2.3.38.1.8 Undofile::getObjectVersion()

Description.  This method gets the undo file's object version (see Section 8.6, “NDB Schema Object Versions”).

Signature. 

virtual int getObjectVersion
  (
    void
  ) const

Parameters.  None.

Return value.  The object version, as an integer.

2.3.38.1.9 Undofile::getPath()

Description.  This method retrieves the path matching the location of the undo file on the data node's file system.

Signature. 

const char* getPath
    (
      void
    ) const

Parameters.  None.

Return value.  The file system path, a string (as a character pointer).

2.3.38.1.10 Undofile::getSize()

Description.  This method gets the size of the undo file in bytes.

Signature. 

Uint64 getSize
    (
      void
    ) const

Parameters.  None.

Return value.  The size in bytes of the undo file, as an unsigned 64-bit integer.

2.3.38.1.11 Undofile::setLogfileGroup()

Description.  Given either a name or an object reference to a log file group, the setLogfileGroup() method assigns the undo file to that log file group.

Signature.  Using a log file group name:

void setLogfileGroup
    (
      const char* name
    )

Using a reference to an instance of LogfileGroup:

void setLogfileGroup
    (
      const class LogfileGroup & logfileGroup
    )

Parameters.  The name of the log file group (a character pointer), or a reference to a LogfileGroup instance.

Return value.  None.

2.3.38.1.12 Undofile::setNode()

Description.  Sets the node on which the log file group is to reside.

Signature. 

 void setNode
    (
      Uint32 nodeId
    )

Parameters.  The nodeId of the data node where the undo file is to be placed; this is an unsigned 32-bit integer.

Return value.  None.

2.3.38.1.13 Undofile::setPath()

Description.  This method is used to set the file system path of the undo file on the data node where it resides.

Signature. 

void setPath
    (
      const char* path
    )

Parameters.  The desired path to the undo file.

Return value.  None.

2.3.38.1.14 Undofile::setSize()

Description.  Sets the size of the undo file in bytes.

Signature. 

void setSize
    (
      Uint64 size
    )

Parameters.  The intended size of the undo file in bytes, as an unsigned 64-bit integer.

Return value.  None.