public class

CassandraChunkedStorageProvider

extends Object
implements ChunkedStorageProvider
java.lang.Object
   ↳ com.netflix.astyanax.recipes.storage.CassandraChunkedStorageProvider

Class Overview

ChunkProvider responsible for reading and writing chunks to cassandra. Chunks are written to different row keys with the row key name having the format $

Summary

Nested Classes
enum CassandraChunkedStorageProvider.Columns  
Public Constructors
CassandraChunkedStorageProvider(Keyspace keyspace, String cfName)
CassandraChunkedStorageProvider(Keyspace keyspace, ColumnFamily<StringString> cf)
Public Methods
void deleteObject(String objectName, Integer chunkCount)
Delete a chunk
ConsistencyLevel getConsistencyLevel()
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@return
CassandraChunkedStorageProvider setConsistencyLevel(ConsistencyLevel consistencyLevel)
CassandraChunkedStorageProvider withColumnName(CassandraChunkedStorageProvider.Columns column, String name)
CassandraChunkedStorageProvider withRowKeyFormat(String format)
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.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.netflix.astyanax.recipes.storage.ChunkedStorageProvider

Public Constructors

public CassandraChunkedStorageProvider (Keyspace keyspace, String cfName)

public CassandraChunkedStorageProvider (Keyspace keyspace, ColumnFamily<StringString> cf)

Public Methods

public void deleteObject (String objectName, Integer chunkCount)

Delete a chunk

public ConsistencyLevel getConsistencyLevel ()

public int getDefaultChunkSize ()

Return the preferred chunk size for this provider

public ByteBuffer readChunk (String objectName, int chunkId)

Read the request chunk id from the storage

Throws
Exception

public ObjectMetadata readMetadata (String objectName)

Retrieve information for a file@return

public CassandraChunkedStorageProvider setConsistencyLevel (ConsistencyLevel consistencyLevel)

public CassandraChunkedStorageProvider withRowKeyFormat (String format)

public int writeChunk (String objectName, int chunkId, ByteBuffer data, Integer ttl)

Write a single chunk to the storage

Throws
Exception

public void writeMetadata (String objectName, ObjectMetadata attr)

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

Throws
Exception