@Namespace(value="plasma") @NoOffset @Properties(inherit=plasma.class) public class PlasmaClient extends Pointer
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
PlasmaClient() |
PlasmaClient(long size)
Native array allocator.
|
PlasmaClient(Pointer p)
Pointer cast constructor.
|
Modifier and Type | Method and Description |
---|---|
Status |
Abort(UniqueID object_id)
Abort an unsealed object in the object store.
|
Status |
Connect(BytePointer store_socket_name) |
Status |
Connect(BytePointer store_socket_name,
BytePointer manager_socket_name,
int release_delay,
int num_retries) |
Status |
Connect(String store_socket_name) |
Status |
Connect(String store_socket_name,
String manager_socket_name,
int release_delay,
int num_retries)
Connect to the local plasma store.
|
Status |
Contains(UniqueID object_id,
boolean[] has_object) |
Status |
Contains(UniqueID object_id,
BoolPointer has_object)
Check if the object store contains a particular object and the object has
been sealed.
|
Status |
Create(UniqueID object_id,
long data_size,
byte[] metadata,
long metadata_size,
ArrowBuffer data) |
Status |
Create(UniqueID object_id,
long data_size,
byte[] metadata,
long metadata_size,
ArrowBuffer data,
int device_num,
boolean evict_if_full) |
Status |
Create(UniqueID object_id,
long data_size,
ByteBuffer metadata,
long metadata_size,
ArrowBuffer data) |
Status |
Create(UniqueID object_id,
long data_size,
ByteBuffer metadata,
long metadata_size,
ArrowBuffer data,
int device_num,
boolean evict_if_full) |
Status |
Create(UniqueID object_id,
long data_size,
BytePointer metadata,
long metadata_size,
ArrowBuffer data) |
Status |
Create(UniqueID object_id,
long data_size,
BytePointer metadata,
long metadata_size,
ArrowBuffer data,
int device_num,
boolean evict_if_full)
Create an object in the Plasma Store.
|
Status |
CreateAndSeal(UniqueID object_id,
BytePointer data,
BytePointer metadata) |
Status |
CreateAndSeal(UniqueID object_id,
BytePointer data,
BytePointer metadata,
boolean evict_if_full) |
Status |
CreateAndSeal(UniqueID object_id,
String data,
String metadata) |
Status |
CreateAndSeal(UniqueID object_id,
String data,
String metadata,
boolean evict_if_full)
Create and seal an object in the object store.
|
Status |
CreateAndSealBatch(UniqueID object_ids,
StringVector data,
StringVector metadata) |
Status |
CreateAndSealBatch(UniqueID object_ids,
StringVector data,
StringVector metadata,
boolean evict_if_full)
Create and seal multiple objects in the object store.
|
String |
DebugString()
Get the current debug string from the plasma store server.
|
Status |
DecodeNotifications(byte[] buffer,
UniqueID object_ids,
long[] data_sizes,
long[] metadata_sizes) |
Status |
DecodeNotifications(ByteBuffer buffer,
UniqueID object_ids,
LongBuffer data_sizes,
LongBuffer metadata_sizes) |
Status |
DecodeNotifications(BytePointer buffer,
UniqueID object_ids,
LongPointer data_sizes,
LongPointer metadata_sizes) |
Status |
Delete(UniqueID object_id)
Delete an object from the object store.
|
Status |
Disconnect()
Disconnect from the local plasma instance, including the local store and
manager.
|
Status |
Evict(long num_bytes,
long[] num_bytes_evicted) |
Status |
Evict(long num_bytes,
LongBuffer num_bytes_evicted) |
Status |
Evict(long num_bytes,
LongPointer num_bytes_evicted)
Delete objects until we have freed up num_bytes bytes or there are no more
released objects that can be deleted.
|
Status |
Get(UniqueID object_ids,
long num_objects,
long timeout_ms,
ObjectBuffer object_buffers)
Deprecated variant of Get() that doesn't automatically release buffers
when they get out of scope.
|
Status |
Get(UniqueID object_ids,
long timeout_ms,
ObjectBuffer object_buffers)
Get some objects from the Plasma Store.
|
Status |
GetNotification(int fd,
UniqueID object_id,
long[] data_size,
long[] metadata_size) |
Status |
GetNotification(int fd,
UniqueID object_id,
LongBuffer data_size,
LongBuffer metadata_size) |
Status |
GetNotification(int fd,
UniqueID object_id,
LongPointer data_size,
LongPointer metadata_size)
Receive next object notification for this client if Subscribe has been called.
|
PlasmaClient |
getPointer(long i) |
Status |
Hash(UniqueID object_id,
byte[] digest) |
Status |
Hash(UniqueID object_id,
ByteBuffer digest) |
Status |
Hash(UniqueID object_id,
BytePointer digest)
Compute the hash of an object in the object store.
|
Status |
List(StringStringMap objects)
List all the objects in the object store.
|
PlasmaClient |
position(long position) |
Status |
Refresh(UniqueID object_ids)
Bump objects up in the LRU cache, i.e.
|
Status |
Release(UniqueID object_id)
Tell Plasma that the client no longer needs the object.
|
Status |
Seal(UniqueID object_id)
Seal an object in the object store.
|
Status |
SetClientOptions(BytePointer client_name,
long output_memory_quota) |
Status |
SetClientOptions(String client_name,
long output_memory_quota)
Set runtime options for this client.
|
long |
store_capacity()
Get the memory capacity of the store.
|
Status |
Subscribe(int[] fd) |
Status |
Subscribe(IntBuffer fd) |
Status |
Subscribe(IntPointer fd)
Subscribe to notifications when objects are sealed in the object store.
|
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, getDirectBufferAddress, getPointer, getPointer, getPointer, hashCode, interruptDeallocatorThread, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetAddress, offsetof, offsetof, parseBytes, physicalBytes, physicalBytesInaccurate, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, toString, totalBytes, totalCount, totalPhysicalBytes, withDeallocator, zero
public PlasmaClient(Pointer p)
Pointer(Pointer)
.public PlasmaClient(long size)
Pointer.position(long)
.public PlasmaClient()
public PlasmaClient position(long position)
public PlasmaClient getPointer(long i)
getPointer
in class Pointer
@ByVal public Status Connect(@StdString String store_socket_name, @StdString String manager_socket_name, int release_delay, int num_retries)
store_socket_name
- The name of the UNIX domain socket to use to
connect to the Plasma store.manager_socket_name
- The name of the UNIX domain socket to use to
connect to the local Plasma manager. If this is "", then this
function will not connect to a manager.
Note that plasma manager is no longer supported, this function
will return failure if this is not "".release_delay
- Deprecated (not used).num_retries
- number of attempts to connect to IPC socket, default 50@ByVal public Status Connect(@StdString String store_socket_name)
@ByVal public Status Connect(@StdString BytePointer store_socket_name, @StdString BytePointer manager_socket_name, int release_delay, int num_retries)
@ByVal public Status Connect(@StdString BytePointer store_socket_name)
@ByVal public Status SetClientOptions(@StdString String client_name, @Cast(value="int64_t") long output_memory_quota)
client_name
- The name of the client, used in debug messages.output_memory_quota
- The memory quota in bytes for objects created by
this client.@ByVal public Status SetClientOptions(@StdString BytePointer client_name, @Cast(value="int64_t") long output_memory_quota)
@ByVal public Status Create(@Cast(value="const plasma::ObjectID*") @ByRef UniqueID object_id, @Cast(value="int64_t") long data_size, @Cast(value="const uint8_t*") BytePointer metadata, @Cast(value="int64_t") long metadata_size, @SharedPtr @Cast(value={"","std::shared_ptr<arrow::Buffer>*"}) ArrowBuffer data, int device_num, @Cast(value="bool") boolean evict_if_full)
object_id
- The ID to use for the newly created object.data_size
- The size in bytes of the space to be allocated for this
object's
data (this does not include space used for metadata).metadata
- The object's metadata. If there is no metadata, this
pointer
should be NULL.metadata_size
- The size in bytes of the metadata. If there is no
metadata, this should be 0.data
- The address of the newly created object will be written here.device_num
- The number of the device where the object is being
created.
device_num = 0 corresponds to the host,
device_num = 1 corresponds to GPU0,
device_num = 2 corresponds to GPU1, etc.evict_if_full
- Whether to evict other objects to make space for
this object.@ByVal public Status Create(@Cast(value="const plasma::ObjectID*") @ByRef UniqueID object_id, @Cast(value="int64_t") long data_size, @Cast(value="const uint8_t*") BytePointer metadata, @Cast(value="int64_t") long metadata_size, @SharedPtr @Cast(value={"","std::shared_ptr<arrow::Buffer>*"}) ArrowBuffer data)
@ByVal public Status Create(@Cast(value="const plasma::ObjectID*") @ByRef UniqueID object_id, @Cast(value="int64_t") long data_size, @Cast(value="const uint8_t*") ByteBuffer metadata, @Cast(value="int64_t") long metadata_size, @SharedPtr @Cast(value={"","std::shared_ptr<arrow::Buffer>*"}) ArrowBuffer data, int device_num, @Cast(value="bool") boolean evict_if_full)
@ByVal public Status Create(@Cast(value="const plasma::ObjectID*") @ByRef UniqueID object_id, @Cast(value="int64_t") long data_size, @Cast(value="const uint8_t*") ByteBuffer metadata, @Cast(value="int64_t") long metadata_size, @SharedPtr @Cast(value={"","std::shared_ptr<arrow::Buffer>*"}) ArrowBuffer data)
@ByVal public Status Create(@Cast(value="const plasma::ObjectID*") @ByRef UniqueID object_id, @Cast(value="int64_t") long data_size, @Cast(value="const uint8_t*") byte[] metadata, @Cast(value="int64_t") long metadata_size, @SharedPtr @Cast(value={"","std::shared_ptr<arrow::Buffer>*"}) ArrowBuffer data, int device_num, @Cast(value="bool") boolean evict_if_full)
@ByVal public Status Create(@Cast(value="const plasma::ObjectID*") @ByRef UniqueID object_id, @Cast(value="int64_t") long data_size, @Cast(value="const uint8_t*") byte[] metadata, @Cast(value="int64_t") long metadata_size, @SharedPtr @Cast(value={"","std::shared_ptr<arrow::Buffer>*"}) ArrowBuffer data)
@ByVal public Status CreateAndSeal(@Cast(value="const plasma::ObjectID*") @ByRef UniqueID object_id, @StdString String data, @StdString String metadata, @Cast(value="bool") boolean evict_if_full)
object_id
- The ID of the object to create.data
- The data for the object to create.metadata
- The metadata for the object to create.evict_if_full
- Whether to evict other objects to make space for
this object.@ByVal public Status CreateAndSeal(@Cast(value="const plasma::ObjectID*") @ByRef UniqueID object_id, @StdString String data, @StdString String metadata)
@ByVal public Status CreateAndSeal(@Cast(value="const plasma::ObjectID*") @ByRef UniqueID object_id, @StdString BytePointer data, @StdString BytePointer metadata, @Cast(value="bool") boolean evict_if_full)
@ByVal public Status CreateAndSeal(@Cast(value="const plasma::ObjectID*") @ByRef UniqueID object_id, @StdString BytePointer data, @StdString BytePointer metadata)
@ByVal public Status CreateAndSealBatch(@Cast(value="plasma::ObjectID*") @StdVector UniqueID object_ids, @Const @ByRef StringVector data, @Const @ByRef StringVector metadata, @Cast(value="bool") boolean evict_if_full)
object_ids
- The vector of IDs of the objects to create.data
- The vector of data for the objects to create.metadata
- The vector of metadata for the objects to create.evict_if_full
- Whether to evict other objects to make space for
these objects.@ByVal public Status CreateAndSealBatch(@Cast(value="plasma::ObjectID*") @StdVector UniqueID object_ids, @Const @ByRef StringVector data, @Const @ByRef StringVector metadata)
@ByVal public Status Get(@Cast(value="plasma::ObjectID*") @StdVector UniqueID object_ids, @Cast(value="int64_t") long timeout_ms, @StdVector ObjectBuffer object_buffers)
object_ids
- The IDs of the objects to get.timeout_ms
- The amount of time in milliseconds to wait before this
request times out. If this value is -1, then no timeout is set.object_buffers
- [out] The object results.@ByVal public Status Get(@Cast(value="const plasma::ObjectID*") UniqueID object_ids, @Cast(value="int64_t") long num_objects, @Cast(value="int64_t") long timeout_ms, ObjectBuffer object_buffers)
object_ids
- The IDs of the objects to get.num_objects
- The number of object IDs to get.timeout_ms
- The amount of time in milliseconds to wait before this
request times out. If this value is -1, then no timeout is set.object_buffers
- An array where the results will be stored.@ByVal public Status Release(@Cast(value="const plasma::ObjectID*") @ByRef UniqueID object_id)
object_id
- The ID of the object that is no longer needed.@ByVal public Status Contains(@Cast(value="const plasma::ObjectID*") @ByRef UniqueID object_id, @Cast(value="bool*") BoolPointer has_object)
object_id
- The ID of the object whose presence we are checking.has_object
- The function will write true at this address if
the object is present and false if it is not present.@ByVal public Status Contains(@Cast(value="const plasma::ObjectID*") @ByRef UniqueID object_id, @Cast(value="bool*") boolean[] has_object)
@ByVal public Status List(@Cast(value="plasma::ObjectTable*") StringStringMap objects)
objects
- [out] ObjectTable of objects in the store. For each entry
in the map, the following fields are available:
- metadata_size: Size of the object metadata in bytes
- data_size: Size of the object data in bytes
- ref_count: Number of clients referencing the object buffer
- create_time: Unix timestamp of the object creation
- construct_duration: Object creation time in seconds
- state: Is the object still being created or already sealed?@ByVal public Status Abort(@Cast(value="const plasma::ObjectID*") @ByRef UniqueID object_id)
object_id
- The ID of the object to abort.@ByVal public Status Seal(@Cast(value="const plasma::ObjectID*") @ByRef UniqueID object_id)
object_id
- The ID of the object to seal.@ByVal public Status Delete(@Cast(value="const plasma::ObjectID*") @ByRef UniqueID object_id)
object_id
- The ID of the object to delete.@ByVal public Status Evict(@Cast(value="int64_t") long num_bytes, @Cast(value="int64_t*") @ByRef LongPointer num_bytes_evicted)
num_bytes
- The number of bytes to try to free up.num_bytes_evicted
- Out parameter for total number of bytes of space
retrieved.@ByVal public Status Evict(@Cast(value="int64_t") long num_bytes, @Cast(value="int64_t*") @ByRef LongBuffer num_bytes_evicted)
@ByVal public Status Evict(@Cast(value="int64_t") long num_bytes, @Cast(value="int64_t*") @ByRef long[] num_bytes_evicted)
@ByVal public Status Refresh(@Cast(value="plasma::ObjectID*") @StdVector UniqueID object_ids)
object_ids
- The IDs of the objects to bump.@ByVal public Status Hash(@Cast(value="const plasma::ObjectID*") @ByRef UniqueID object_id, @Cast(value="uint8_t*") BytePointer digest)
object_id
- The ID of the object we want to hash.digest
- A pointer at which to return the hash digest of the object.
The pointer must have at least kDigestSize bytes allocated.@ByVal public Status Hash(@Cast(value="const plasma::ObjectID*") @ByRef UniqueID object_id, @Cast(value="uint8_t*") ByteBuffer digest)
@ByVal public Status Hash(@Cast(value="const plasma::ObjectID*") @ByRef UniqueID object_id, @Cast(value="uint8_t*") byte[] digest)
@ByVal public Status Subscribe(IntPointer fd)
fd
- Out parameter for the file descriptor the client should use to
read notifications
from the object store about sealed objects.@ByVal public Status GetNotification(int fd, @Cast(value="plasma::ObjectID*") UniqueID object_id, @Cast(value="int64_t*") LongPointer data_size, @Cast(value="int64_t*") LongPointer metadata_size)
fd
- The file descriptor we are reading the notification from.object_id
- Out parameter, the object_id of the object that was sealed.data_size
- Out parameter, the data size of the object that was sealed.metadata_size
- Out parameter, the metadata size of the object that was sealed.@ByVal public Status GetNotification(int fd, @Cast(value="plasma::ObjectID*") UniqueID object_id, @Cast(value="int64_t*") LongBuffer data_size, @Cast(value="int64_t*") LongBuffer metadata_size)
@ByVal public Status GetNotification(int fd, @Cast(value="plasma::ObjectID*") UniqueID object_id, @Cast(value="int64_t*") long[] data_size, @Cast(value="int64_t*") long[] metadata_size)
@ByVal public Status DecodeNotifications(@Cast(value="const uint8_t*") BytePointer buffer, @Cast(value="plasma::ObjectID*") @StdVector UniqueID object_ids, @Cast(value="int64_t*") @StdVector LongPointer data_sizes, @Cast(value="int64_t*") @StdVector LongPointer metadata_sizes)
@ByVal public Status DecodeNotifications(@Cast(value="const uint8_t*") ByteBuffer buffer, @Cast(value="plasma::ObjectID*") @StdVector UniqueID object_ids, @Cast(value="int64_t*") @StdVector LongBuffer data_sizes, @Cast(value="int64_t*") @StdVector LongBuffer metadata_sizes)
@ByVal public Status DecodeNotifications(@Cast(value="const uint8_t*") byte[] buffer, @Cast(value="plasma::ObjectID*") @StdVector UniqueID object_ids, @Cast(value="int64_t*") @StdVector long[] data_sizes, @Cast(value="int64_t*") @StdVector long[] metadata_sizes)
@ByVal public Status Disconnect()
@StdString public String DebugString()
Copyright © 2022. All rights reserved.