Core

Hazelcast Core objects and constants.

class MemberInfo(address, uuid, attributes, lite_member, version, *_)

Bases: object

Represents a member in the cluster with its address, uuid, lite member status, attributes and version.

address

Address of the member.

Type

hazelcast.core.Address

uuid

UUID of the member.

Type

uuid.UUID

attributes

Configured attributes of the member.

Type

dict[str, str]

lite_member

True if the member is a lite member, False otherwise. Lite members do not own any partition.

Type

bool

version

Hazelcast codebase version of the member.

Type

hazelcast.core.MemberVersion

class Address(host, port)

Bases: object

Represents an address of a member in the cluster.

host

Host of the address.

Type

str

port

Port of the address.

Type

int

class AddressHelper

Bases: object

static get_possible_addresses(address)
static address_from_str(address, port=- 1)
class DistributedObjectInfo(service_name, name)

Bases: object

class DistributedObjectEventType

Bases: object

Type of the distributed object event.

CREATED = 'CREATED'

DistributedObject is created.

DESTROYED = 'DESTROYED'

DistributedObject is destroyed.

class DistributedObjectEvent(name, service_name, event_type, source)

Bases: object

Distributed Object Event

name

Name of the distributed object.

Type

str

service_name

Service name of the distributed object.

Type

str

event_type

Event type. Either CREATED or DESTROYED.

Type

str

source

UUID of the member that fired the event.

Type

uuid.UUID

class SimpleEntryView(key, value, cost, creation_time, expiration_time, hits, last_access_time, last_stored_time, last_update_time, version, ttl, max_idle)

Bases: object

EntryView represents a readonly view of a map entry.

key

The key of the entry.

value

The value of the entry.

cost

The cost in bytes of the entry.

Type

int

creation_time

The creation time of the entry.

Type

int

expiration_time

The expiration time of the entry.

Type

int

hits

Number of hits of the entry.

Type

int

last_access_time

The last access time for the entry.

Type

int

last_stored_time

The last store time for the value.

Type

int

last_update_time

The last time the value was updated.

Type

int

version

The version of the entry.

Type

int

ttl

The last set time to live milliseconds.

Type

int

max_idle

The last set max idle time in milliseconds.

Type

int

class HazelcastJsonValue(value)

Bases: object

HazelcastJsonValue is a wrapper for JSON formatted strings.

It is preferred to store HazelcastJsonValue instead of Strings for JSON formatted strings. Users can run predicates and use indexes on the attributes of the underlying JSON strings.

HazelcastJsonValue is queried using Hazelcast’s querying language. See Distributed Query section.

In terms of querying, numbers in JSON strings are treated as either Long or Double in the Java side. str, bool and None are treated as String, boolean and null respectively.

HazelcastJsonValue keeps given string as it is. Strings are not checked for being valid. Ill-formatted JSON strings may cause false positive or false negative results in queries.

HazelcastJsonValue can also be constructed from JSON serializable objects. In that case, objects are converted to JSON strings and stored as such. If an error occurs during the conversion, it is raised directly.

None values are not allowed.

to_string()

Returns unaltered string that was used to create this object.

Returns

The original string.

Return type

str

loads()

Deserializes the string that was used to create this object and returns as Python object.

Returns

The Python object represented by the original string.

Return type

any

class MemberVersion(major, minor, patch)

Bases: object

Determines the Hazelcast codebase version in terms of major.minor.patch version.

major
minor
patch