com.amazon.carbonado
Class CorruptEncodingException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.amazon.carbonado.RepositoryException
              extended by com.amazon.carbonado.FetchException
                  extended by com.amazon.carbonado.CorruptEncodingException
All Implemented Interfaces:
Serializable

public class CorruptEncodingException
extends FetchException

A CorruptEncodingException is caused when decoding an encoded record fails.

Author:
Brian S O'Neill
See Also:
Serialized Form

Constructor Summary
CorruptEncodingException()
           
CorruptEncodingException(int expectedGeneration, int actualGeneration)
           
CorruptEncodingException(String message)
           
CorruptEncodingException(String message, Throwable cause)
           
CorruptEncodingException(Throwable cause)
           
 
Method Summary
 String getMessage()
           
 Storable getStorableWithPrimaryKey()
          If the decoder was able to extract the primary key, it will be available in the returned Storable.
 void setStorableWithPrimaryKey(Storable s)
          If the decoder can at least extract the primary key, it should set it here.
 
Methods inherited from class com.amazon.carbonado.RepositoryException
backoff, getRootCause, makeFetchException, makePersistException, toFetchException, toFetchException, toPersistException, toPersistException
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CorruptEncodingException

public CorruptEncodingException()

CorruptEncodingException

public CorruptEncodingException(String message)

CorruptEncodingException

public CorruptEncodingException(String message,
                                Throwable cause)

CorruptEncodingException

public CorruptEncodingException(Throwable cause)

CorruptEncodingException

public CorruptEncodingException(int expectedGeneration,
                                int actualGeneration)
Parameters:
expectedGeneration - expected layout generation of decoded storable
actualGeneration - actual layout generation of decoded storable
Method Detail

setStorableWithPrimaryKey

public void setStorableWithPrimaryKey(Storable s)
If the decoder can at least extract the primary key, it should set it here.


getStorableWithPrimaryKey

public Storable getStorableWithPrimaryKey()
If the decoder was able to extract the primary key, it will be available in the returned Storable.

Returns:
partial Storable with primary key defined, or null if unable to decode the key

getMessage

public String getMessage()
Overrides:
getMessage in class Throwable


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