Class HierarchicalObjectRepository<T>
java.lang.Object
org.apache.activemq.artemis.core.settings.impl.HierarchicalObjectRepository<T>
- All Implemented Interfaces:
HierarchicalRepository<T>
allows objects to be mapped against a regex pattern and held in order in a list
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceModifies the match String for any add or get from the repository -
Constructor Summary
ConstructorsConstructorDescriptionHierarchicalObjectRepository(WildcardConfiguration wildcardConfiguration) HierarchicalObjectRepository(WildcardConfiguration wildcardConfiguration, HierarchicalObjectRepository.MatchModifier matchModifier, String literalMatchMarkers) -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a new match to the repositoryvoidAdd a new match to the repositoryvoidAdd a new match to the repositoryvoidclear()clear the repositoryvoidClears the cache.voidRemoves all listeners.booleancontainsExactMatch(String match) booleancontainsExactWildcardMatch(String match) voidvoidintReturns the default match for this repo.Returns the value held against the nearest match.voidregister a listener to listen for changes in the repositoryvoidremoveMatch(String match) remove a match from the repositoryvoidsetDefault(T defaultValue) set the default value to fallback to if none foundvoidvoidunregister a listenervalues()Return a list of Values being added
-
Constructor Details
-
HierarchicalObjectRepository
public HierarchicalObjectRepository() -
HierarchicalObjectRepository
-
HierarchicalObjectRepository
public HierarchicalObjectRepository(WildcardConfiguration wildcardConfiguration, HierarchicalObjectRepository.MatchModifier matchModifier, String literalMatchMarkers)
-
-
Method Details
-
disableListeners
public void disableListeners()- Specified by:
disableListenersin interfaceHierarchicalRepository<T>
-
enableListeners
public void enableListeners()- Specified by:
enableListenersin interfaceHierarchicalRepository<T>
-
values
Description copied from interface:HierarchicalRepositoryReturn a list of Values being added- Specified by:
valuesin interfaceHierarchicalRepository<T>
-
addMatch
Description copied from interface:HierarchicalRepositoryAdd a new match to the repository- Specified by:
addMatchin interfaceHierarchicalRepository<T>- Parameters:
match- the pattern to use to match againstvalue- the value to hold against the match
-
addMatch
Description copied from interface:HierarchicalRepositoryAdd a new match to the repository- Specified by:
addMatchin interfaceHierarchicalRepository<T>- Parameters:
match- the pattern to use to match againstvalue- the value to hold against the match
-
addMatch
Description copied from interface:HierarchicalRepositoryAdd a new match to the repository- Specified by:
addMatchin interfaceHierarchicalRepository<T>- Parameters:
match- the pattern to use to match againstvalue- the value to hold against the matchimmutableMatch- whether this match can be removednotifyListeners- whether to notify any listeners that the match has been added
-
getCacheSize
public int getCacheSize()- Specified by:
getCacheSizein interfaceHierarchicalRepository<T>
-
getMatch
Returns the value held against the nearest match.- Specified by:
getMatchin interfaceHierarchicalRepository<T>- Parameters:
match- the match to look for- Returns:
- the value held against the nearest match
-
containsExactMatch
- Specified by:
containsExactMatchin interfaceHierarchicalRepository<T>
-
containsExactWildcardMatch
- Specified by:
containsExactWildcardMatchin interfaceHierarchicalRepository<T>
-
removeMatch
remove a match from the repository- Specified by:
removeMatchin interfaceHierarchicalRepository<T>- Parameters:
match- the match to remove
-
registerListener
Description copied from interface:HierarchicalRepositoryregister a listener to listen for changes in the repository- Specified by:
registerListenerin interfaceHierarchicalRepository<T>
-
unRegisterListener
Description copied from interface:HierarchicalRepositoryunregister a listener- Specified by:
unRegisterListenerin interfaceHierarchicalRepository<T>
-
setDefault
set the default value to fallback to if none found- Specified by:
setDefaultin interfaceHierarchicalRepository<T>- Parameters:
defaultValue- the value
-
getDefault
Description copied from interface:HierarchicalRepositoryReturns the default match for this repo.- Specified by:
getDefaultin interfaceHierarchicalRepository<T>- Returns:
- the default match for this repo
-
clear
public void clear()Description copied from interface:HierarchicalRepositoryclear the repository- Specified by:
clearin interfaceHierarchicalRepository<T>
-
swap
- Specified by:
swapin interfaceHierarchicalRepository<T>
-
clearListeners
public void clearListeners()Description copied from interface:HierarchicalRepositoryRemoves all listeners.- Specified by:
clearListenersin interfaceHierarchicalRepository<T>
-
clearCache
public void clearCache()Description copied from interface:HierarchicalRepositoryClears the cache.- Specified by:
clearCachein interfaceHierarchicalRepository<T>
-