Documentation Home
MySQL Cluster API Developer Guide
Download this Manual
PDF (US Ltr) - 4.9Mb
PDF (A4) - 4.8Mb
EPUB - 1.9Mb
HTML Download (TGZ) - 1.8Mb
HTML Download (Zip) - 1.9Mb


2.3.10.1 HashMap Methods

Abstract

The sections that follow describe each of the public methods of the HashMap class.

2.3.10.1.1 HashMap Constructor

Description.  The HashMap class constructor normally requires no arguments. A copy constructor is also available.

See also Section 2.3.4.1.6, “Dictionary::createHashMap()”, for more information.

Signature.  Base constructor:

HashMap HashMap
    (
      void
    )

Copy constructor:

HashMap HashMap
    (
      const HashMap& hashmap
    )

Destructor:

virtual ~HashMap
    (
      void
    )

Parameters.  None, or the address of an existing HashMap object to be copied.

Return value.  A new instance of HashMap, possibly a copy of an existing one.

2.3.10.1.2 HashMap::setName()

Description.  Sets the name of the hash map.

Signature. 

void setName
    (
      const char* name
    )

Parameters.  The name to be assigned to the hashmap.

Return value.  None.

2.3.10.1.3 HashMap::getName()

Description.  Gets the name of the hash map.

Signature. 

const char* getName
    (
      void
    ) const

Parameters.  None.

Return value.  The name of the hash map.

2.3.10.1.4 HashMap::setMap()

Description.  Assigns a set of values to a has map.

Signature. 

void setMap
    (
      const Uint32* values, 
      Uint32 len
    )

Parameters.  A pointer to a set of values of length len.

Return value.  None.

2.3.10.1.5 HashMap::getMapLen()

Description.  Gets the hash map's length; that is, the number of values which it contains. You can obtain the values using getMapValues().

Signature. 

Uint32 getMapLen
    (
      void
    ) const

Parameters.  None.

Return value.  The length of the hash map.

2.3.10.1.6 HashMap::getMapValues()

Description.  Gets the values listed in the hash map.

Signature. 

int getMapValues
    (
      Uint32* dst, 
      Uint32 len
    ) const

Parameters.  A pointer to a set of values (dst) and the number of values (len).

Return value.  Returns 0 on success; on failure, returns -1 and sets error.

2.3.10.1.7 HashMap::equal()

Description.  Compares (only) the values of this HashMap with those of another one.

Signature. 

bool equal
    (
      const HashMap& hashmap
    ) const

Parameters.  A reference to the hash map to be compared with this one.

Return value.  None.

2.3.10.1.8 HashMap::getObjectStatus()

Description.  This method retrieves the status of the HashMap for which it is invoked. The return value is of type Object::Status.

Signature. 

virtual Status getObjectStatus
    (
      void
    ) const

Parameters.  None.

Return value.  Returns the current Status of the HashMap.

2.3.10.1.9 HashMap::getObjectVersion()

Description.  The method gets the hash map's schema object version.

Signature. 

virtual int getObjectVersion
    (
      void
    ) const

Parameters.  None.

Return value.  The object's version number, an integer.

2.3.10.1.10 HashMap::getObjectId()

Description.  This method retrieves the hash map's ID.

Signature. 

virtual int getObjectId
    (
      void
    ) const

Parameters.  None.

Return value.  The object ID, an integer.


User Comments
Sign Up Login You must be logged in to post a comment.