Class OStorageConfigurationImpl
java.lang.Object
com.orientechnologies.orient.core.config.OStorageConfigurationImpl
- All Implemented Interfaces:
OStorageConfiguration,OSerializableStream,Serializable
- Direct Known Subclasses:
OStorageConfigurationSegment,OStorageMemoryConfiguration
public class OStorageConfigurationImpl
extends Object
implements OSerializableStream, OStorageConfiguration
Versions:
- 3 = introduced file directory in physical segments and data-segment id in clusters
- 4 = ??
- 5 = ??
- 6 = ??
- 7 = ??
- 8 = introduced cluster selection strategy as string
- 9 = introduced minimumclusters as string
- 12 = introduced record conflict strategy as string in both storage and paginated clusters
- 13 = introduced cluster status to manage cluster as "offline" with the new command "alter cluster status offline". Removed data segments
- 14 = no changes, but version was incremented
- 15 = introduced encryption and encryptionKey
- 18 = we keep version of product release under which storage was created
- 19 = Page size and related parameters are stored inside configuration
- Author:
- Luca Garulli (l.garulli--(at)--orientdb.com)
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ReentrantReadWriteLockprotected final Charsetprotected OStorageConfigurationUpdateListenerFields inherited from interface com.orientechnologies.orient.core.config.OStorageConfiguration
CURRENT_BINARY_FORMAT_VERSION, CURRENT_VERSION, DEFAULT_CHARSET, DEFAULT_DATE_FORMAT, DEFAULT_DATETIME_FORMAT -
Constructor Summary
ConstructorsConstructorDescriptionOStorageConfigurationImpl(OAbstractPaginatedStorage iStorage, Charset streamCharset) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidaddIndexEngine(String name, IndexEngineData engineData) voidvoidclose()voidcreate()voiddelete()voiddeleteIndexEngine(String name) voiddropCluster(int iClusterId) fromStream(byte[] iStream) Deprecated.voidfromStream(byte[] stream, int offset, int length, Charset charset) intintgetIndexEngine(String name, int defaultIndexId) intintgetName()intgetProperty(String iName) intgetUuid()intvoidbooleanbooleanload(OContextConfiguration configuration) This method load the record information by the internal cluster segment.voidremoveProperty(String iName) voidsetCharset(String charset) voidsetClusterSelection(String clusterSelection) voidsetClusterStatus(int clusterId, OStorageClusterConfiguration.STATUS iStatus) voidsetConfigurationUpdateListener(OStorageConfigurationUpdateListener updateListener) voidsetConflictStrategy(String conflictStrategy) voidsetCreationVersion(String version) Sets version of product release under which storage was created.voidsetDateFormat(String dateFormat) voidsetDateTimeFormat(String dateTimeFormat) voidsetFreeListBoundary(int freeListBoundary) voidsetIndexMgrRecordId(String indexMgrRecordId) voidsetLocaleCountry(String iValue) voidsetLocaleLanguage(String iValue) voidsetMaxKeySize(int maxKeySize) voidsetMinimumClusters(int minimumClusters) voidsetPageSize(int pageSize) voidsetProperty(String iName, String iValue) voidsetRecordSerializer(String recordSerializer) voidsetRecordSerializerVersion(int recordSerializerVersion) voidsetSchemaRecordId(String schemaRecordId) voidsetTimeZone(TimeZone timeZone) voidsetUuid(OAtomicOperation atomicOperation, String uuid) voidsetValidation(boolean validation) byte[]toStream()Deprecated.because method uses native encoding usetoStream(Charset)instead.byte[]Added version used for managed Network Versioning.byte[]voidupdate()
-
Field Details
-
lock
-
updateListener
-
streamCharset
-
-
Constructor Details
-
OStorageConfigurationImpl
-
-
Method Details
-
getPageSize
public int getPageSize()- Specified by:
getPageSizein interfaceOStorageConfiguration
-
setPageSize
public void setPageSize(int pageSize) -
getFreeListBoundary
public int getFreeListBoundary()- Specified by:
getFreeListBoundaryin interfaceOStorageConfiguration
-
setFreeListBoundary
public void setFreeListBoundary(int freeListBoundary) -
getMaxKeySize
public int getMaxKeySize()- Specified by:
getMaxKeySizein interfaceOStorageConfiguration
-
setMaxKeySize
public void setMaxKeySize(int maxKeySize) -
setCreationVersion
Sets version of product release under which storage was created. -
getCreatedAtVersion
- Specified by:
getCreatedAtVersionin interfaceOStorageConfiguration- Returns:
- version of product release under which storage was created.
-
initConfiguration
-
getConflictStrategy
- Specified by:
getConflictStrategyin interfaceOStorageConfiguration
-
setConflictStrategy
-
getContextConfiguration
- Specified by:
getContextConfigurationin interfaceOStorageConfiguration
-
load
public OStorageConfigurationImpl load(OContextConfiguration configuration) throws OSerializationException This method load the record information by the internal cluster segment. It's for compatibility with older database than 0.9.25.- Throws:
OSerializationException
-
update
- Throws:
OSerializationException
-
getDirectory
- Specified by:
getDirectoryin interfaceOStorageConfiguration
-
getLocaleInstance
- Specified by:
getLocaleInstancein interfaceOStorageConfiguration
-
getDateFormatInstance
- Specified by:
getDateFormatInstancein interfaceOStorageConfiguration
-
getDateTimeFormatInstance
- Specified by:
getDateTimeFormatInstancein interfaceOStorageConfiguration
-
fromStream
-
fromStream
Deprecated.because method uses native encoding usefromStream(byte[], int, int, Charset)instead.Description copied from interface:OSerializableStreamUnmarshalls the object. Fills the current object with the values contained in the byte array representation restoring a previous state. Usually byte[] comes from the storage or network.- Specified by:
fromStreamin interfaceOSerializableStream- Parameters:
iStream- byte array representation of the object- Returns:
- The Object instance itself giving a "fluent interface". Useful to call multiple methods in chain.
- Throws:
OSerializationException- if the unmarshalling does not succeed
-
toStream
Deprecated.because method uses native encoding usetoStream(Charset)instead.Description copied from interface:OSerializableStreamMarshalls the object. Transforms the current object in byte[] form to being stored or transferred over the network.- Specified by:
toStreamin interfaceOSerializableStream- Returns:
- The byte array representation of the object
- Throws:
OSerializationException- if the marshalling does not succeed- See Also:
-
toStream
- Throws:
OSerializationException
-
toStream
Added version used for managed Network Versioning.- Throws:
OSerializationException
-
create
- Throws:
IOException
-
delete
- Throws:
IOException
-
close
- Throws:
IOException
-
dropCluster
public void dropCluster(int iClusterId) -
addCluster
-
addIndexEngine
-
deleteIndexEngine
-
indexEngines
- Specified by:
indexEnginesin interfaceOStorageConfiguration
-
getIndexEngine
- Specified by:
getIndexEnginein interfaceOStorageConfiguration
-
setClusterStatus
-
getTimeZone
- Specified by:
getTimeZonein interfaceOStorageConfiguration
-
setTimeZone
-
getLocaleLanguage
- Specified by:
getLocaleLanguagein interfaceOStorageConfiguration
-
setLocaleLanguage
-
getLocaleCountry
- Specified by:
getLocaleCountryin interfaceOStorageConfiguration
-
setLocaleCountry
-
getCharset
- Specified by:
getCharsetin interfaceOStorageConfiguration
-
setCharset
-
getDateFormat
- Specified by:
getDateFormatin interfaceOStorageConfiguration
-
getDateTimeFormat
- Specified by:
getDateTimeFormatin interfaceOStorageConfiguration
-
getClusterSelection
- Specified by:
getClusterSelectionin interfaceOStorageConfiguration
-
setClusterSelection
-
getMinimumClusters
public int getMinimumClusters()- Specified by:
getMinimumClustersin interfaceOStorageConfiguration
-
setMinimumClusters
public void setMinimumClusters(int minimumClusters) -
getRecordSerializer
- Specified by:
getRecordSerializerin interfaceOStorageConfiguration
-
setRecordSerializer
-
getRecordSerializerVersion
public int getRecordSerializerVersion()- Specified by:
getRecordSerializerVersionin interfaceOStorageConfiguration
-
setRecordSerializerVersion
public void setRecordSerializerVersion(int recordSerializerVersion) -
isStrictSql
public boolean isStrictSql()- Specified by:
isStrictSqlin interfaceOStorageConfiguration
-
getProperties
- Specified by:
getPropertiesin interfaceOStorageConfiguration
-
setProperty
-
getProperty
- Specified by:
getPropertyin interfaceOStorageConfiguration
-
removeProperty
-
clearProperties
public void clearProperties() -
isValidationEnabled
public boolean isValidationEnabled()- Specified by:
isValidationEnabledin interfaceOStorageConfiguration
-
setValidation
public void setValidation(boolean validation) -
getSchemaRecordId
- Specified by:
getSchemaRecordIdin interfaceOStorageConfiguration
-
setSchemaRecordId
-
getIndexMgrRecordId
- Specified by:
getIndexMgrRecordIdin interfaceOStorageConfiguration
-
setIndexMgrRecordId
-
setDateFormat
-
setDateTimeFormat
-
getBinaryFormatVersion
public int getBinaryFormatVersion()- Specified by:
getBinaryFormatVersionin interfaceOStorageConfiguration
-
getName
- Specified by:
getNamein interfaceOStorageConfiguration
-
getVersion
public int getVersion()- Specified by:
getVersionin interfaceOStorageConfiguration
-
getClusters
- Specified by:
getClustersin interfaceOStorageConfiguration
-
setConfigurationUpdateListener
-
getUuid
- Specified by:
getUuidin interfaceOStorageConfiguration
-
setUuid
- Specified by:
setUuidin interfaceOStorageConfiguration
-
fromStream(byte[], int, int, Charset)instead.