com.amazon.carbonado.raw
Class CustomStorableCodecFactory
java.lang.Object
com.amazon.carbonado.raw.CustomStorableCodecFactory
- All Implemented Interfaces:
- StorableCodecFactory
public abstract class CustomStorableCodecFactory
- extends Object
- implements StorableCodecFactory
Factory for custom storable codecs.
- Author:
- Brian S O'Neill
|
Method Summary |
protected abstract
|
createCodec(Class<S> type,
boolean isMaster,
Layout layout)
|
protected
|
createCodec(Class<S> type,
boolean isMaster,
Layout layout,
RawSupport support)
|
|
createCodec(Class<S> type,
StorableIndex pkIndex,
boolean isMaster,
Layout layout)
|
|
createCodec(Class<S> type,
StorableIndex pkIndex,
boolean isMaster,
Layout layout,
RawSupport support)
|
String |
getStorageName(Class<? extends Storable> type)
Returns null to let repository decide what the name should be. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CustomStorableCodecFactory
public CustomStorableCodecFactory()
getStorageName
public String getStorageName(Class<? extends Storable> type)
throws SupportException
- Returns null to let repository decide what the name should be.
- Specified by:
getStorageName in interface StorableCodecFactory
- Throws:
SupportException - if type is not supported
createCodec
public <S extends Storable> CustomStorableCodec<S> createCodec(Class<S> type,
StorableIndex pkIndex,
boolean isMaster,
Layout layout)
throws SupportException
- Specified by:
createCodec in interface StorableCodecFactory
- Parameters:
type - type of storable to create codec forpkIndex - ignoredisMaster - when true, version properties and sequences are managedlayout - when non-null, attempt to encode a storable layout
generation value in each storable
- Throws:
SupportException - if type is not supported
createCodec
public <S extends Storable> CustomStorableCodec<S> createCodec(Class<S> type,
StorableIndex pkIndex,
boolean isMaster,
Layout layout,
RawSupport support)
throws SupportException
- Specified by:
createCodec in interface StorableCodecFactory
- Parameters:
type - type of storable to create codec forpkIndex - ignoredisMaster - when true, version properties and sequences are managedlayout - when non-null, attempt to encode a storable layout
generation value in each storablesupport - binds generated storable with a storage layer
- Throws:
SupportException - if type is not supported- Since:
- 1.2
createCodec
protected abstract <S extends Storable> CustomStorableCodec<S> createCodec(Class<S> type,
boolean isMaster,
Layout layout)
throws SupportException
- Parameters:
type - type of storable to create codec forisMaster - when true, version properties and sequences are managedlayout - when non-null, attempt to encode a storable layout
generation value in each storable
- Throws:
SupportException - if type is not supported
createCodec
protected <S extends Storable> CustomStorableCodec<S> createCodec(Class<S> type,
boolean isMaster,
Layout layout,
RawSupport support)
throws SupportException
- Parameters:
type - type of storable to create codec forisMaster - when true, version properties and sequences are managedlayout - when non-null, attempt to encode a storable layout
generation value in each storablesupport - binds generated storable with a storage layer
- Throws:
SupportException - if type is not supported- Since:
- 1.2
Copyright © 2006-2009 Amazon Technologies, Inc.. All Rights Reserved.