A UUID generator object.

Instances of the UUID generator object are thread-safe to generate UUIDs.

Functions

CassUuidGen *

cass_uuid_gen_new

( )

Creates a new UUID generator.

Note: This object is thread-safe. It is best practice to create and reuse a single object per application.

Note: If unique node information (IP address) is unable to be determined then random node information will be generated.

Returns:
Type Details
CassUuidGen *

Returns a UUID generator that must be freed.

See Also:
CassUuidGen *

cass_uuid_gen_new_with_node

( node )

Creates a new UUID generator with custom node information.

Note: This object is thread-safe. It is best practice to create and reuse a single object per application.

Parameters:
Name Type Details
node
Returns:
Type Details
CassUuidGen *

Returns a UUID generator that must be freed.

See Also:
void

cass_uuid_gen_free

( uuid_gen )

Frees a UUID generator instance.

Parameters:
Name Type Details
in uuid_gen
void

cass_uuid_gen_time

( uuid_gen, output )

Generates a V1 (time) UUID.

Note: This method is thread-safe

Parameters:
Name Type Details
in uuid_gen
out output

A V1 UUID for the current time.

void

cass_uuid_gen_random

( uuid_gen, output )

Generates a new V4 (random) UUID

Note: This method is thread-safe

Parameters:
Name Type Details
in uuid_gen
output

A randomly generated V4 UUID.

void

cass_uuid_gen_from_time

( uuid_gen, timestamp, output )

Generates a V1 (time) UUID for the specified time.

Note: This method is thread-safe

Parameters:
Name Type Details
in uuid_gen
in timestamp
out output

A V1 UUID for the specified time.