public class InMemoryObjectEntry
extends java.lang.Object
| Constructor and Description |
|---|
InMemoryObjectEntry(java.lang.String bucketName,
java.lang.String objectName,
long createTimeMillis,
java.lang.String contentType,
java.util.Map<java.lang.String,byte[]> metadata) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getBucketName()
Returns the bucketName initially provided at construction-time of this InMemoryObjectEntry; it
will never change over the lifetime of this InMemoryObjectEntry.
|
GoogleCloudStorageItemInfo |
getInfo()
Gets the
GoogleCloudStorageItemInfo associated with this InMemoryObjectEntry, whose
'size' is only updated when the initial writer has finished closing the channel. |
java.lang.String |
getObjectName()
Returns the objectName initially provided at construction-time of this InMemoryObjectEntry; it
will never change over the lifetime of this InMemoryObjectEntry.
|
java.nio.channels.SeekableByteChannel |
getReadChannel()
Returns a SeekableByteChannel pointing at this InMemoryObjectEntry's byte contents; a previous
writer must have already closed the associated WritableByteChannel to commit the byte contents
and make them available for reading.
|
java.nio.channels.SeekableByteChannel |
getReadChannel(GoogleCloudStorageReadOptions readOptions)
Returns a SeekableByteChannel pointing at this InMemoryObjectEntry's byte contents; a previous
writer must have already closed the associated WritableByteChannel to commit the byte contents
and make them available for reading.
|
InMemoryObjectEntry |
getShallowCopy(java.lang.String bucketName,
java.lang.String objectName)
Returns a copy of this InMemoryObjectEntry which shares the underlying completedContents data;
it is illegal to call this method if the write channel has not yet been closed.
|
java.nio.channels.WritableByteChannel |
getWriteChannel()
Returns a WritableByteChannel for this InMemoryObjectEntry's byte contents; the same channel is
returned on each call, and it is illegal to call this method if the channel has ever been
closed already.
|
void |
patchMetadata(java.util.Map<java.lang.String,byte[]> newMetadata)
Updates the metadata associated with this InMemoryObjectEntry.
|
public InMemoryObjectEntry(java.lang.String bucketName,
java.lang.String objectName,
long createTimeMillis,
java.lang.String contentType,
java.util.Map<java.lang.String,byte[]> metadata)
public java.lang.String getObjectName()
public java.lang.String getBucketName()
public InMemoryObjectEntry getShallowCopy(java.lang.String bucketName, java.lang.String objectName) throws java.io.IOException
java.io.IOExceptionpublic java.nio.channels.WritableByteChannel getWriteChannel()
throws java.io.IOException
java.io.IOExceptionpublic java.nio.channels.SeekableByteChannel getReadChannel()
throws java.io.IOException
java.io.IOExceptionpublic java.nio.channels.SeekableByteChannel getReadChannel(GoogleCloudStorageReadOptions readOptions) throws java.io.IOException
java.io.IOExceptionpublic GoogleCloudStorageItemInfo getInfo()
GoogleCloudStorageItemInfo associated with this InMemoryObjectEntry, whose
'size' is only updated when the initial writer has finished closing the channel.public void patchMetadata(java.util.Map<java.lang.String,byte[]> newMetadata)
throws java.io.IOException
java.io.IOExceptionCopyright © 2019. All rights reserved.