public class UnlazyUpdateStrategy extends java.lang.Object implements CachingBOLoaderUpdateStrategyI
| Modifier and Type | Field and Description |
|---|---|
static java.util.Set<java.lang.Class> |
DEFAULT_IGNORE_CLASSES_FOR_UPDATING
A list of internal classes that should be unmodifiable anyway and can be safely ignored when listening for changes
|
$0| Constructor and Description |
|---|
UnlazyUpdateStrategy(SchemaI schema,
java.util.Collection<java.lang.Class> rootClasses,
java.util.Collection<java.lang.String> unlazyUpdateInformation,
java.util.Set<java.lang.Class> ignoredClassesWhenUpdating) |
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<EntityI,java.util.Set<AttributeI>> |
getFullUnlazyMap() |
static java.util.Collection<java.lang.String> |
getNetwork(BO bo,
java.util.Set<java.lang.String> recursionGuard,
boolean onlyManyRelations)
This method iterates over the provided BO and returns all currently unlazy relations of the accessible network.
|
SchemaI |
getSchema() |
java.util.Set<AttributeI> |
getUnlazyManyrelations(java.lang.Class clazz) |
java.util.Set<AttributeI> |
getUnlazyManyrelations(EntityI entity) |
java.util.Set |
getUpdateableEntities()
A list of all entities to keep updated, in this case: All entities that are reachable from the provided roots in theory
|
boolean |
hasUnlazyManyrelations(java.lang.Class clazz) |
boolean |
hasUnlazyManyrelations(EntityI entity) |
boolean |
isLoadAnyChangesIntoCache() |
boolean |
isRelevantRegardingKeepClasses(java.lang.Class aClass)
Checks if the provided class is expected to be reachable from the provided roots
|
boolean |
isUnlazy(EntityI entity,
AttributeI attr) |
void |
setSchema(SchemaI schema) |
public static final java.util.Set<java.lang.Class> DEFAULT_IGNORE_CLASSES_FOR_UPDATING
public UnlazyUpdateStrategy(SchemaI schema, java.util.Collection<java.lang.Class> rootClasses, java.util.Collection<java.lang.String> unlazyUpdateInformation, java.util.Set<java.lang.Class> ignoredClassesWhenUpdating)
public java.util.Set getUpdateableEntities()
getUpdateableEntities in interface CachingBOLoaderUpdateStrategyIpublic boolean isRelevantRegardingKeepClasses(java.lang.Class aClass)
isRelevantRegardingKeepClasses in interface CachingBOLoaderUpdateStrategyIpublic boolean isLoadAnyChangesIntoCache()
isLoadAnyChangesIntoCache in interface CachingBOLoaderUpdateStrategyIpublic SchemaI getSchema()
public void setSchema(SchemaI schema)
public java.util.Set<AttributeI> getUnlazyManyrelations(java.lang.Class clazz)
public java.util.Set<AttributeI> getUnlazyManyrelations(EntityI entity)
public boolean isUnlazy(EntityI entity, AttributeI attr)
public boolean hasUnlazyManyrelations(java.lang.Class clazz)
public boolean hasUnlazyManyrelations(EntityI entity)
public java.util.Map<EntityI,java.util.Set<AttributeI>> getFullUnlazyMap()
public static java.util.Collection<java.lang.String> getNetwork(BO bo, java.util.Set<java.lang.String> recursionGuard, boolean onlyManyRelations)
//make sure that there aren't unkown unlazies till now.
final def before = UnlazyUpdateStrategy.getNetwork(bo, null, false)
def debugClosure = {
log.info("DebugClosure started, waiting 10 seconds....")
Thread.sleep(15000)
log.info("Getting network")
def after = UnlazyUpdateStrategy.getNetwork(bo, null, false)
//log.info("\nBEFORE (${before.size()})\n${ before.sort().join('\n') }")
//log.info("\nAFTER (${after.size()})\n${ after.sort().join('\n') }")
def delta = (after-before)
log.info("\nDELTA (${delta.size()})\n${ delta.sort().join('\n') }")
}
Executors.newSingleThreadExecutor().execute(debugClosure as Runnable)
Copyright © 2000-2025 OAshi S.à r.l. All Rights Reserved.