com.amazon.carbonado.raw
Class CompressedStorableCodecFactory

java.lang.Object
  extended by com.amazon.carbonado.raw.GenericStorableCodecFactory
      extended by com.amazon.carbonado.raw.CompressedStorableCodecFactory
All Implemented Interfaces:
StorableCodecFactory

public class CompressedStorableCodecFactory
extends GenericStorableCodecFactory

Extension of GenericStorableCodecFactory that allows for compression.

Author:
Olga Kuznetsova, Brian S O'Neill

Constructor Summary
CompressedStorableCodecFactory(Map<String,CompressionType> compressionMap)
           
 
Method Summary
protected
<S extends Storable>
GenericEncodingStrategy<S>
createStrategy(Class<S> type, StorableIndex<S> pkIndex, LayoutOptions options)
          Override to return a different EncodingStrategy.
protected  CompressionType getCompressionType(Class<? extends Storable> type)
           
 LayoutOptions getLayoutOptions(Class<? extends Storable> type)
          Returns null.
 
Methods inherited from class com.amazon.carbonado.raw.GenericStorableCodecFactory
createCodec, createCodec, createStrategy, getStorageName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompressedStorableCodecFactory

public CompressedStorableCodecFactory(Map<String,CompressionType> compressionMap)
Method Detail

getLayoutOptions

public LayoutOptions getLayoutOptions(Class<? extends Storable> type)
Description copied from class: GenericStorableCodecFactory
Returns null.

Specified by:
getLayoutOptions in interface StorableCodecFactory
Overrides:
getLayoutOptions in class GenericStorableCodecFactory

createStrategy

protected <S extends Storable> GenericEncodingStrategy<S> createStrategy(Class<S> type,
                                                                         StorableIndex<S> pkIndex,
                                                                         LayoutOptions options)
                                                              throws SupportException
Description copied from class: GenericStorableCodecFactory
Override to return a different EncodingStrategy.

Overrides:
createStrategy in class GenericStorableCodecFactory
Parameters:
type - type of Storable to generate code for
pkIndex - specifies sequence and ordering of key properties (optional)
options - additional layout options (optional)
Throws:
SupportException

getCompressionType

protected CompressionType getCompressionType(Class<? extends Storable> type)
Returns:
non-null compression type for the given storable


Copyright © 2006-2009 Amazon Technologies, Inc.. All Rights Reserved.