Class DistributedScheme.BackupConfig
- java.lang.Object
-
- com.tangosol.coherence.config.scheme.AbstractScheme
-
- com.tangosol.coherence.config.scheme.DistributedScheme.BackupConfig
-
- All Implemented Interfaces:
BuilderCustomization<Map>,BackupMapConfig,Scheme
- Enclosing class:
- DistributedScheme
public static class DistributedScheme.BackupConfig extends AbstractScheme implements BackupMapConfig
TheDistributedScheme.BackupConfigclass manages configuration for the partitioned cache backup map.
-
-
Constructor Summary
Constructors Constructor Description BackupConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetBackupSchemeName(ParameterResolver resolver)Return the name of the caching scheme to use as a backup map.ParameterizedBuilder<Map>getCustomBuilder()Obtains the customParameterizedBuilder.StringgetDirectory(ParameterResolver resolver)Return the root directory where the disk persistence manager stores files.intgetInitialSize(ParameterResolver resolver)Return the initial buffer size in bytes for off-heap and file-mapped backup maps.intgetMaximumSize(ParameterResolver resolver)Return the maximum buffer size in bytes for off-heap and file-mapped backup maps.intresolveType(ParameterResolver resolver, MapBuilder bldrPrimaryMap)Resolve the backup map type using the configuration specified by the application.voidsetBackupSchemeName(Expression<String> expr)Set the name of the caching scheme to use as a backup map.voidsetCustomBuilder(ParameterizedBuilder<Map> bldr)Set the InstanceBuilder that builds the custom instance.voidsetDirectory(Expression<String> expr)Set the root directory where the disk persistence manager stores files.voidsetInitialSize(Expression<com.oracle.coherence.common.util.MemorySize> expr)Return the initial buffer size in bytes for off-heap and file-mapped backup maps.voidsetMaximumSize(Expression<com.oracle.coherence.common.util.MemorySize> expr)Set the maximum buffer size in bytes for off-heap and file-mapped backup maps.voidsetType(Expression<String> expr)Set the type of storage to hold the backup data.protected inttranslateType(String sType)Translate the backup map type string.-
Methods inherited from class com.tangosol.coherence.config.scheme.AbstractScheme
getSchemeName, isAnonymous, setSchemeName, validate
-
-
-
-
Method Detail
-
resolveType
public int resolveType(ParameterResolver resolver, MapBuilder bldrPrimaryMap)
Resolve the backup map type using the configuration specified by the application. The primary map is also need in special cases to determine the type.- Specified by:
resolveTypein interfaceBackupMapConfig- Parameters:
resolver- the ParameterResolverbldrPrimaryMap- the primary map builder which may be used to determine the backup type- Returns:
- the backup map type enumerated in
BackingMapScheme
-
getDirectory
public String getDirectory(ParameterResolver resolver)
Return the root directory where the disk persistence manager stores files. This is only valid for file-mapped type.- Specified by:
getDirectoryin interfaceBackupMapConfig- Parameters:
resolver- the ParameterResolver- Returns:
- the root directory
-
setDirectory
@Injectable public void setDirectory(Expression<String> expr)
Set the root directory where the disk persistence manager stores files. This is only valid for file-mapped type.- Parameters:
expr- the directory name
-
getInitialSize
public int getInitialSize(ParameterResolver resolver)
Return the initial buffer size in bytes for off-heap and file-mapped backup maps.- Specified by:
getInitialSizein interfaceBackupMapConfig- Parameters:
resolver- the ParameterResolver- Returns:
- the write maximum batch size
-
setInitialSize
@Injectable public void setInitialSize(Expression<com.oracle.coherence.common.util.MemorySize> expr)
Return the initial buffer size in bytes for off-heap and file-mapped backup maps.- Parameters:
expr- the initial buffer size
-
getMaximumSize
public int getMaximumSize(ParameterResolver resolver)
Return the maximum buffer size in bytes for off-heap and file-mapped backup maps.- Specified by:
getMaximumSizein interfaceBackupMapConfig- Parameters:
resolver- the ParameterResolver- Returns:
- the write maximum buffer size
-
setMaximumSize
@Injectable public void setMaximumSize(Expression<com.oracle.coherence.common.util.MemorySize> expr)
Set the maximum buffer size in bytes for off-heap and file-mapped backup maps.- Parameters:
expr- the maximum buffer size
-
getBackupSchemeName
public String getBackupSchemeName(ParameterResolver resolver)
Return the name of the caching scheme to use as a backup map. Note that the scheme name is used as a key to lookup the scheme in the cache mapping. This is in contrast with the scheme name in the baseAbstractSchemeclass which self-identifies a scheme object.- Specified by:
getBackupSchemeNamein interfaceBackupMapConfig- Parameters:
resolver- the ParameterResolver- Returns:
- the scheme name
-
setBackupSchemeName
@Injectable("scheme-name") public void setBackupSchemeName(Expression<String> expr)
Set the name of the caching scheme to use as a backup map.- Parameters:
expr- the scheme name
-
setType
@Injectable public void setType(Expression<String> expr)
Set the type of storage to hold the backup data.- Parameters:
expr- the maximum buffer size
-
getCustomBuilder
public ParameterizedBuilder<Map> getCustomBuilder()
Obtains the customParameterizedBuilder.- Specified by:
getCustomBuilderin interfaceBuilderCustomization<Map>- Returns:
- the
ParameterizedBuilder
-
setCustomBuilder
public void setCustomBuilder(ParameterizedBuilder<Map> bldr)
Set the InstanceBuilder that builds the custom instance.- Specified by:
setCustomBuilderin interfaceBuilderCustomization<Map>- Parameters:
bldr- the InstanceBuilder
-
translateType
protected int translateType(String sType)
Translate the backup map type string.- Parameters:
sType- the map type- Returns:
- the translated type enumerated in
BackingMapScheme
-
-