Class SitesConfiguration
- java.lang.Object
-
- org.infinispan.configuration.cache.SitesConfiguration
-
- All Implemented Interfaces:
org.infinispan.commons.configuration.attributes.Matchable<SitesConfiguration>
,BaseConfigurationInfo
,ConfigurationInfo
public class SitesConfiguration extends Object implements org.infinispan.commons.configuration.attributes.Matchable<SitesConfiguration>, ConfigurationInfo
- Since:
- 5.2
- Author:
- Mircea.Markus@jboss.com
-
-
Field Summary
Fields Modifier and Type Field Description static org.infinispan.commons.configuration.attributes.AttributeDefinition<Boolean>
DISABLE_BACKUPS
static org.infinispan.commons.configuration.elements.ElementDefinition
ELEMENT_DEFINITION
static org.infinispan.commons.configuration.attributes.AttributeDefinition<Set<String>>
IN_USE_BACKUP_SITES
-
Constructor Summary
Constructors Constructor Description SitesConfiguration(org.infinispan.commons.configuration.attributes.AttributeSet attributes, List<BackupConfiguration> allBackups, BackupForConfiguration backupFor)
-
Method Summary
-
-
-
Field Detail
-
DISABLE_BACKUPS
public static final org.infinispan.commons.configuration.attributes.AttributeDefinition<Boolean> DISABLE_BACKUPS
-
IN_USE_BACKUP_SITES
public static final org.infinispan.commons.configuration.attributes.AttributeDefinition<Set<String>> IN_USE_BACKUP_SITES
-
ELEMENT_DEFINITION
public static final org.infinispan.commons.configuration.elements.ElementDefinition ELEMENT_DEFINITION
-
-
Constructor Detail
-
SitesConfiguration
public SitesConfiguration(org.infinispan.commons.configuration.attributes.AttributeSet attributes, List<BackupConfiguration> allBackups, BackupForConfiguration backupFor)
-
-
Method Detail
-
subElements
public List<ConfigurationInfo> subElements()
- Specified by:
subElements
in interfaceConfigurationInfo
- Returns:
- the list of sub elements.
-
getElementDefinition
public org.infinispan.commons.configuration.elements.ElementDefinition getElementDefinition()
- Specified by:
getElementDefinition
in interfaceBaseConfigurationInfo
- Returns:
- the
ElementDefinition
of the configuration.
-
disableBackups
public boolean disableBackups()
Returns true if this cache won't backup its data remotely. It would still accept other sites backing up data on this site.
-
allBackups
public List<BackupConfiguration> allBackups()
Returns the list of all sites where this cache might back up its data. The list of actual sites is defined byinUseBackupSites
.
-
enabledBackups
public List<BackupConfiguration> enabledBackups()
Returns the list ofBackupConfiguration
that haveBackupConfiguration.enabled()
== true.
-
enabledBackupStream
public Stream<BackupConfiguration> enabledBackupStream()
-
backupFor
public BackupForConfiguration backupFor()
- Returns:
- information about caches that backup data into this cache.
-
getFailurePolicy
public BackupFailurePolicy getFailurePolicy(String siteName)
-
hasInUseBackup
public boolean hasInUseBackup(String siteName)
-
hasEnabledBackups
public boolean hasEnabledBackups()
-
hasSyncEnabledBackups
public boolean hasSyncEnabledBackups()
-
syncBackupsStream
public Stream<BackupConfiguration> syncBackupsStream()
-
hasAsyncEnabledBackups
public boolean hasAsyncEnabledBackups()
-
asyncBackupsStream
public Stream<BackupConfiguration> asyncBackupsStream()
-
attributes
public org.infinispan.commons.configuration.attributes.AttributeSet attributes()
- Specified by:
attributes
in interfaceBaseConfigurationInfo
- Returns:
- the
AttributeSet
declared by the configuration.
-
hashCode
public int hashCode()
-
equals
public boolean equals(Object obj)
-
toString
public String toString()
-
-