public class ObjectInfo
extends java.lang.Object
implements io.nats.client.support.JsonSerializable
| Modifier and Type | Class and Description |
|---|---|
static class |
ObjectInfo.Builder
A builder for ObjectInfo
|
| Constructor and Description |
|---|
ObjectInfo(Message m)
Construct ObjectInfo from a message
|
ObjectInfo(MessageInfo mi)
Construct ObjectInfo from message info
|
| Modifier and Type | Method and Description |
|---|---|
static ObjectInfo.Builder |
builder(ObjectInfo info)
Get an instance of the builder initialized from existing ObjectInfo
|
static ObjectInfo.Builder |
builder(java.lang.String bucket,
ObjectMeta meta)
Get an instance of the builder initialized with a bucket and object meta
|
static ObjectInfo.Builder |
builder(java.lang.String bucket,
java.lang.String objectName)
Get an instance of the builder initialized with a bucket and object meta
|
boolean |
equals(java.lang.Object o) |
@NonNull java.lang.String |
getBucket()
the bucket name
|
long |
getChunks()
The total number of chunks in the object
|
@Nullable java.lang.String |
getDescription()
The object meta description
|
@Nullable java.lang.String |
getDigest()
The digest string for the object
|
@NonNull io.nats.client.impl.Headers |
getHeaders()
The object meta Headers.
|
@Nullable ObjectLink |
getLink()
If this is a link to an object, get the ObjectLink instance, otherwise this will be null
|
@NonNull java.util.Map<java.lang.String,java.lang.String> |
getMetaData()
The object meta metadata.
|
@Nullable java.time.ZonedDateTime |
getModified()
When the object was last modified
|
@Nullable java.lang.String |
getNuid()
the bucket nuid
|
@NonNull ObjectMeta |
getObjectMeta()
The full object meta object
|
@Nullable java.lang.String |
getObjectName()
The object name
|
long |
getSize()
The size of the object
|
int |
hashCode() |
boolean |
isDeleted()
Whether the object is deleted
|
boolean |
isLink()
Whether the object is actually a link
|
@NonNull java.lang.String |
toJson() |
java.lang.String |
toString() |
public ObjectInfo(MessageInfo mi)
mi - the message infopublic ObjectInfo(Message m)
m - the messagepublic @NonNull java.lang.String toJson()
toJson in interface io.nats.client.support.JsonSerializablepublic @NonNull java.lang.String getBucket()
public @Nullable java.lang.String getNuid()
public long getSize()
public @Nullable java.time.ZonedDateTime getModified()
public long getChunks()
public @Nullable java.lang.String getDigest()
public boolean isDeleted()
public @NonNull ObjectMeta getObjectMeta()
public @Nullable java.lang.String getObjectName()
public @Nullable java.lang.String getDescription()
public @NonNull io.nats.client.impl.Headers getHeaders()
public @NonNull java.util.Map<java.lang.String,java.lang.String> getMetaData()
public boolean isLink()
public @Nullable ObjectLink getLink()
public static ObjectInfo.Builder builder(java.lang.String bucket, java.lang.String objectName)
bucket - the bucket nameobjectName - the object namepublic static ObjectInfo.Builder builder(java.lang.String bucket, ObjectMeta meta)
bucket - the bucketmeta - the object metapublic static ObjectInfo.Builder builder(ObjectInfo info)
info - the infopublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object