com.amazon.carbonado.repo.sleepycat
Class StoredDatabaseInfo

java.lang.Object
  extended by com.amazon.carbonado.repo.sleepycat.StoredDatabaseInfo
All Implemented Interfaces:
Unevolvable, Unindexed, Storable

@PrimaryKey(value="databaseName")
@Independent
@Alias(value="CARBONADO_DATABASE_INFO")
public abstract class StoredDatabaseInfo
extends Object
implements Storable, Unevolvable, Unindexed

Stores basic information about the BDB databases managed by BDBRepository.

Note: This storable cannot have indexes defined, since it is used to discover information about indexes. It would create a cyclic dependency.

Author:
Brian S O'Neill

Field Summary
static int EVOLUTION_NONE
          Evolution strategy code
static int EVOLUTION_STANDARD
          Evolution strategy code
 
Constructor Summary
StoredDatabaseInfo()
           
 
Method Summary
abstract  long getCreationTimestamp()
          Returns the milliseconds from 1970-01-01T00:00:00Z when this record was created.
abstract  String getDatabaseName()
           
abstract  int getEvolutionStrategy()
          Returns EVOLUTION_NONE if evolution of records is not supported.
abstract  byte[] getExtraData()
          Since this record cannot evolve, this property allows it to be extended without conflicting with existing records.
abstract  String getIndexNameDescriptor()
          Returns the index name descriptor for the keys of this database.
abstract  String getIndexTypeDescriptor()
          Returns the types of the index properties.
abstract  int getVersionNumber()
          Record version number for this StoredDatabaseInfo instance.
abstract  void setCreationTimestamp(long timestamp)
           
abstract  void setDatabaseName(String name)
           
abstract  void setEvolutionStrategy(int strategy)
           
abstract  void setExtraData(byte[] data)
           
abstract  void setIndexNameDescriptor(String descriptor)
           
abstract  void setIndexTypeDescriptor(String descriptor)
           
abstract  void setVersionNumber(int version)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.amazon.carbonado.Storable
copy, copyAllProperties, copyDirtyProperties, copyPrimaryKeyProperties, copyUnequalProperties, copyVersionProperty, delete, equalPrimaryKeys, equalProperties, equals, getPropertyValue, hasDirtyProperties, hashCode, insert, isPropertyClean, isPropertyDirty, isPropertySupported, isPropertyUninitialized, load, markAllPropertiesClean, markAllPropertiesDirty, markPropertiesClean, markPropertiesDirty, prepare, propertyMap, readFrom, setPropertyValue, storableType, toString, toStringKeyOnly, tryDelete, tryInsert, tryLoad, tryUpdate, update, writeTo
 

Field Detail

EVOLUTION_NONE

public static final int EVOLUTION_NONE
Evolution strategy code

See Also:
Constant Field Values

EVOLUTION_STANDARD

public static final int EVOLUTION_STANDARD
Evolution strategy code

See Also:
Constant Field Values
Constructor Detail

StoredDatabaseInfo

public StoredDatabaseInfo()
Method Detail

getDatabaseName

public abstract String getDatabaseName()

setDatabaseName

public abstract void setDatabaseName(String name)

getIndexNameDescriptor

@Nullable
public abstract String getIndexNameDescriptor()
Returns the index name descriptor for the keys of this database. This descriptor is defined by StorableIndex, and it does not contain type information.


setIndexNameDescriptor

public abstract void setIndexNameDescriptor(String descriptor)

getIndexTypeDescriptor

@Nullable
public abstract String getIndexTypeDescriptor()
Returns the types of the index properties. This descriptor is defined by StorableIndex.


setIndexTypeDescriptor

public abstract void setIndexTypeDescriptor(String descriptor)

getEvolutionStrategy

public abstract int getEvolutionStrategy()
Returns EVOLUTION_NONE if evolution of records is not supported.


setEvolutionStrategy

public abstract void setEvolutionStrategy(int strategy)

getCreationTimestamp

public abstract long getCreationTimestamp()
Returns the milliseconds from 1970-01-01T00:00:00Z when this record was created.


setCreationTimestamp

public abstract void setCreationTimestamp(long timestamp)

getVersionNumber

@Version
public abstract int getVersionNumber()
Record version number for this StoredDatabaseInfo instance. Some encoding strategies require a version number.


setVersionNumber

public abstract void setVersionNumber(int version)

getExtraData

@Nullable
public abstract byte[] getExtraData()
Since this record cannot evolve, this property allows it to be extended without conflicting with existing records. This record cannot evolve because an evolution strategy likely depends on this interface remaining stable, avoiding a cyclic dependency.


setExtraData

public abstract void setExtraData(byte[] data)


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