| java.lang.Object com.sleepycat.persist.impl.Evolver
Evolver | class Evolver (Code) | | Evolves each old format that is still relevant if necessary, using Mutations
to configure deleters, renamers, and converters.
author: Mark Hayes |
Method Summary | |
void | addEvolveError(Format oldFormat, Format newFormat, String scenario, String error) Adds a specified error when no specific mutation is involved. | void | addInvalidMutation(Format oldFormat, Format newFormat, Mutation mutation, String error) Adds an error for an invalid mutation. | void | addMissingMutation(Format oldFormat, Format newFormat, String error) Adds an error for a missing mutation. | void | addNonEntityFormat(Format oldFormat) Called by PersistCatalog for all non-entity formats. | boolean | areFormatsChanged() Returns whether any formats were changed during evolution, and therefore
need to be stored in the catalog. | boolean | checkUpdatedVersion(String scenario, Format oldFormat, Format newFormat) | void | deleteSecondaryDatabase(Format oldFormat, String keyName) Called by ComplexFormat when a secondary key is dropped. | boolean | evolveFormat(Format oldFormat) Called by PersistCatalog for all entity formats, and by Format.evolve
methods for all potentially referenced non-entity formats. | int | evolveRequiredKeyField(Format oldParent, Format newParent, FieldInfo oldField, FieldInfo newField) Evolves a primary key field or composite key field. | void | finishEvolution() Called by PersistCatalog after calling evolveFormat or
addNonEntityFormat for all old formats. | String | getErrors() Returns an error string if any mutations are invalid or missing, or
returns null otherwise. | final Mutations | getMutations() | Set<Format> | getSubclassFormats(Format superFormat) Returns the set of formats for a specific superclass format, or null if
the superclass is not a complex type or has not subclasses. | boolean | isClassConverted(Format format) | boolean | isFormatChanged(Format format) Returns whether the given format was changed during evolution. | void | renameAndRemoveDatabases(Environment env, Transaction txn) | void | renameSecondaryDatabase(Format oldFormat, Format newFormat, String oldKeyName, String newKeyName) Called by ComplexFormat when a secondary key name is changed. | void | useEvolvedFormat(Format oldFormat, Reader evolveReader, Format newFormat) Install an evolver Reader in the old format. | void | useOldFormat(Format oldFormat, Format newFormat) Use the old format and discard the new format. |
EVOLVE_FAILURE | final static int EVOLVE_FAILURE(Code) | | |
EVOLVE_NEEDED | final static int EVOLVE_NEEDED(Code) | | |
EVOLVE_NONE | final static int EVOLVE_NONE(Code) | | |
addEvolveError | void addEvolveError(Format oldFormat, Format newFormat, String scenario, String error)(Code) | | Adds a specified error when no specific mutation is involved.
|
addMissingMutation | void addMissingMutation(Format oldFormat, Format newFormat, String error)(Code) | | Adds an error for a missing mutation.
|
addNonEntityFormat | void addNonEntityFormat(Format oldFormat)(Code) | | Called by PersistCatalog for all non-entity formats.
|
areFormatsChanged | boolean areFormatsChanged()(Code) | | Returns whether any formats were changed during evolution, and therefore
need to be stored in the catalog.
|
deleteSecondaryDatabase | void deleteSecondaryDatabase(Format oldFormat, String keyName)(Code) | | Called by ComplexFormat when a secondary key is dropped.
|
evolveFormat | boolean evolveFormat(Format oldFormat)(Code) | | Called by PersistCatalog for all entity formats, and by Format.evolve
methods for all potentially referenced non-entity formats.
|
evolveRequiredKeyField | int evolveRequiredKeyField(Format oldParent, Format newParent, FieldInfo oldField, FieldInfo newField)(Code) | | Evolves a primary key field or composite key field.
|
finishEvolution | void finishEvolution()(Code) | | Called by PersistCatalog after calling evolveFormat or
addNonEntityFormat for all old formats.
We do not require deletion of an unreferenced class for three
reasons: 1) built-in proxy classes may not be referenced, 2) the
user may wish to declare persistent classes that are not yet used.
|
getErrors | String getErrors()(Code) | | Returns an error string if any mutations are invalid or missing, or
returns null otherwise. If non-null is returned, the store may not be
opened.
|
getSubclassFormats | Set<Format> getSubclassFormats(Format superFormat)(Code) | | Returns the set of formats for a specific superclass format, or null if
the superclass is not a complex type or has not subclasses.
|
isClassConverted | boolean isClassConverted(Format format)(Code) | | |
isFormatChanged | boolean isFormatChanged(Format format)(Code) | | Returns whether the given format was changed during evolution.
|
renameSecondaryDatabase | void renameSecondaryDatabase(Format oldFormat, Format newFormat, String oldKeyName, String newKeyName)(Code) | | Called by ComplexFormat when a secondary key name is changed.
|
useEvolvedFormat | void useEvolvedFormat(Format oldFormat, Reader evolveReader, Format newFormat)(Code) | | Install an evolver Reader in the old format. Called by Format.evolve
when the old and new formats are not identical.
|
useOldFormat | void useOldFormat(Format oldFormat, Format newFormat)(Code) | | Use the old format and discard the new format. Called by
Format.evolve when the old and new formats are identical.
|
|
|