java.io.Serializable
FSComponentRepositoryDB
public class FSComponentExtRepositoryDB<FSCRC extends FSCRDBComponent>
extends java.lang.Object
implements java.io.Serializable
IComponentsRepository.findComponents(X)
as well as
a simple query cache.
This class is not thread safe.Modifier and Type | Field | Description |
---|---|---|
static int |
FIND_CACHE_SIZE |
|
static long |
serialVersionUID |
Constructor | Description |
---|---|
FSComponentExtRepositoryDB() |
|
FSComponentExtRepositoryDB(FSComponentExtRepositoryDB<FSCRC> db) |
Modifier and Type | Method | Description |
---|---|---|
protected void |
clearCache() |
Clear the "find" cache.
|
protected boolean |
delegate(java.lang.String componentName) |
Decides whether a component should be allowed to be found
by repos down the priority chain.
|
boolean |
equals(java.lang.Object obj) |
|
java.util.Collection<java.lang.String> |
findComponents(X propertyExpression) |
Find locally in this DB (see also
IComponentsRepository.findComponents(X) |
int |
getCacheHits() |
Stats of "find" cache.
|
int |
getCacheQueries() |
Stats of "find" cache.
|
int |
getCacheSize() |
Stats of "find" cache.
|
java.util.Map<java.lang.String,FSCRC> |
getComponents() |
|
java.util.Set<java.lang.String> |
getComponentsOfModule(java.lang.String moduleName) |
Gets all components of a given module
|
java.util.Set<java.lang.String> |
getModules() |
gets the modules read-only
|
long |
getRevision(java.lang.String cn) |
Gets rev of local component
|
boolean |
hasComponentModule(java.lang.String componentName) |
Checks whether this DB has the named component's module
|
int |
hashCode() |
|
boolean |
hasModule(java.lang.String moduleName) |
Checks whether this DB has the module
|
static java.lang.String |
moduleOf(java.lang.String componentName) |
Extracts module name from component name (i.e.
|
void |
putComponent(java.lang.String componentName,
FSCRC c) |
Adds a component, updates modules set.
|
void |
removeComponent(java.lang.String componentName) |
Remove a component
|
void |
removeModule(java.lang.String moduleName) |
Remove a complete module
|
public static final int FIND_CACHE_SIZE
public static final long serialVersionUID
public FSComponentExtRepositoryDB()
public FSComponentExtRepositoryDB(FSComponentExtRepositoryDB<FSCRC> db)
protected void clearCache()
public int getCacheHits()
public int getCacheQueries()
public int getCacheSize()
protected boolean delegate(java.lang.String componentName)
componentName
- public java.util.Collection<java.lang.String> findComponents(X propertyExpression) throws java.io.IOException
IComponentsRepository.findComponents(X)
propertyExpression
- java.io.IOException
public long getRevision(java.lang.String cn)
cn
- public java.util.Map<java.lang.String,FSCRC> getComponents()
public void putComponent(java.lang.String componentName, FSCRC c)
public void removeComponent(java.lang.String componentName)
public void removeModule(java.lang.String moduleName)
public boolean hasModule(java.lang.String moduleName)
public boolean hasComponentModule(java.lang.String componentName)
public java.util.Set<java.lang.String> getModules()
public java.util.Set<java.lang.String> getComponentsOfModule(java.lang.String moduleName)
public static java.lang.String moduleOf(java.lang.String componentName)
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object