com.netflix.astyanax.recipes.storage
Interface ChunkedStorageProvider

All Known Implementing Classes:
CassandraChunkedStorageProvider

public interface ChunkedStorageProvider


Method Summary
 void deleteObject(String objectName, Integer chunkCount)
          Delete a chunk
 int getDefaultChunkSize()
          Return the preferred chunk size for this provider
 ByteBuffer readChunk(String objectName, int chunkId)
          Read the request chunk id from the storage
 ObjectMetadata readMetadata(String objectName)
          Retrieve information for a file
 int writeChunk(String objectName, int chunkId, ByteBuffer data, Integer ttl)
          Write a single chunk to the storage
 void writeMetadata(String objectName, ObjectMetadata attr)
          Persist all attributes for an object.
 

Method Detail

writeChunk

int writeChunk(String objectName,
               int chunkId,
               ByteBuffer data,
               Integer ttl)
               throws Exception
Write a single chunk to the storage

Parameters:
chunk -
Throws:
Exception

readChunk

ByteBuffer readChunk(String objectName,
                     int chunkId)
                     throws Exception,
                            NotFoundException
Read the request chunk id from the storage

Parameters:
name -
chunkId -
Returns:
Throws:
Exception
NotFoundException

deleteObject

void deleteObject(String objectName,
                  Integer chunkCount)
                  throws Exception
Delete a chunk

Parameters:
objectName -
chunkId -
Throws:
Exception

writeMetadata

void writeMetadata(String objectName,
                   ObjectMetadata attr)
                   throws Exception
Persist all attributes for an object. Some attributes are written at the start of the operation but are updated after the file has been written with additional information such as the total number of chunks and the file size

Parameters:
objectName -
attr -
Throws:
Exception

readMetadata

ObjectMetadata readMetadata(String objectName)
                            throws Exception,
                                   NotFoundException
Retrieve information for a file

Parameters:
objectName -
Returns:
Throws:
Exception
NotFoundException

getDefaultChunkSize

int getDefaultChunkSize()
Return the preferred chunk size for this provider

Returns:


Copyright © 2012. All Rights Reserved.