public class BasicCachePlugin extends DmpServletPlugin implements CacheIF, Runnable, org.dmd.util.parsing.DmcUncheckedOIFHandlerIF, org.dmd.dmc.DmcNameClashResolverIF, org.dmd.dmc.DmcNameResolverWithClashSupportIF
cache, pluginConfig, pluginManager, servlet| Constructor and Description |
|---|
BasicCachePlugin() |
| Modifier and Type | Method and Description |
|---|---|
Collection<org.dmd.dmw.DmwNamedObjectWrapper> |
addListener(CacheListener listener)
Adds the specified listener to the cache.
|
void |
addNameGenerator(NameGeneratorIF ng)
Adds the specified name generator to the cache.
|
void |
addObject(org.dmd.dmw.DmwNamedObjectWrapper obj)
This method is used to add a new object to the cache during the initialization
phase of the plugins.
|
void |
create(org.dmd.dmw.DmwNamedObjectWrapper obj,
org.dmd.dmp.server.extended.Request request) |
void |
createAndNotify(org.dmd.dmw.DmwNamedObjectWrapper obj) |
void |
delete(org.dmd.dmc.DmcObjectName name,
org.dmd.dmp.server.extended.Request request) |
void |
delete(org.dmd.dmw.DmwNamedObjectWrapper obj) |
void |
deleteAndNotify(org.dmd.dmc.DmcObjectName name) |
void |
deleteAndNotify(org.dmd.dmw.DmwNamedObjectWrapper obj) |
void |
dumpObjects(PrintStream ps)
Dumps all cached objects to the specified PrintStream.
|
org.dmd.dmc.DmcObject |
findNamedDMO(org.dmd.dmc.DmcObjectName name) |
org.dmd.dmc.DmcNamedObjectIF |
findNamedObject(org.dmd.dmc.DmcObjectName name) |
org.dmd.dmc.DmcNamedObjectIF |
findNamedObject(org.dmd.dmc.DmcObjectName name,
int attributeID) |
org.dmd.dmc.DmcNamedObjectIF |
findNamedObjectMayClash(org.dmd.dmc.DmcObject object,
org.dmd.dmc.DmcObjectName name,
org.dmd.dmc.DmcNameClashResolverIF resolver,
org.dmd.dmc.DmcAttributeInfo ai) |
org.dmd.dmw.DmwNamedObjectWrapper |
get(org.dmd.dmc.DmcObjectName name)
Returns the specified object if it exists.
|
Collection<org.dmd.dmw.DmwHierarchicObjectWrapper> |
getAll(org.dmd.dmc.DmcHierarchicObjectName name) |
Collection<org.dmd.dmw.DmwNamedObjectWrapper> |
getIndex(org.dmd.dmc.DmcClassInfo ci) |
int |
getIndexSize(org.dmd.dmc.DmcClassInfo ci) |
Collection<org.dmd.dmw.DmwHierarchicObjectWrapper> |
getNext(org.dmd.dmc.DmcHierarchicObjectName name) |
long |
getNextListenerID()
Returns the next unique listener ID.
|
void |
handleObject(org.dmd.dmc.util.DmcUncheckedObject uco,
String infile,
int lineNumber) |
boolean |
hasIndex(org.dmd.dmc.DmcClassInfo dci) |
protected void |
init()
Derived classes should perform any initialization logic required.
|
void |
maintainIndex(org.dmd.dmc.DmcClassInfo ci)
Indexing is a generally useful mechanism that allows for rapid access to
objects of a particular type.
|
void |
preInit() |
protected void |
processCreateRequest(org.dmd.dmp.server.extended.CreateRequest request) |
protected void |
processDeleteRequest(org.dmd.dmp.server.extended.DeleteRequest request) |
protected void |
processSetRequest(org.dmd.dmp.server.extended.SetRequest request) |
void |
queueCreateRequest(org.dmd.dmp.server.extended.CreateRequest request)
Queues a CreateRequest for processing in the order in which it arrived.
|
void |
queueDeleteRequest(org.dmd.dmp.server.extended.DeleteRequest request)
Queues a DeleteRequest for processing in the order in which it arrived.
|
void |
queueEvent(org.dmd.dmp.server.extended.DMPEvent event)
Queues an event from a remote source for processing by the cache.
|
void |
queueSetRequest(org.dmd.dmp.server.extended.SetRequest request)
Queues a SetRequest for processing in the order in which it arrived.
|
CacheRegistration |
register(SessionIF session)
If you are going to perform operations against a cache, you will need a
unique registration against that cache.
|
void |
removeListener(CacheListener listener)
Removes the specified listener from the cache.
|
void |
removeListenersForSession(SessionIF session)
Removes all cache listeners associated with the specified session.
|
org.dmd.dmc.DmcNamedObjectIF |
resolveClash(org.dmd.dmc.DmcObject obj,
org.dmd.dmc.DmcAttributeInfo ai,
org.dmd.dmc.DmcNameClashObjectSet<?> ncos) |
void |
run() |
void |
set(org.dmd.dmc.DmcObjectName name,
org.dmd.dms.generated.types.DmcTypeModifierMV modifier,
org.dmd.dmp.server.extended.Request request) |
void |
set(org.dmd.dmw.DmwNamedObjectWrapper obj) |
void |
setAndNotify(org.dmd.dmw.DmwNamedObjectWrapper obj) |
void |
shutdown()
When the servlet is destroyed, the shutdown() method is called on all plugins.
|
void |
start()
After all plugins are initialized, the start method is called on all plugins
in the same implied order.
|
getID, getPluginName, setManagerAndConfigpublic void preInit()
throws org.dmd.util.exceptions.ResultException,
org.dmd.dmc.DmcValueException
preInit in class DmpServletPluginorg.dmd.util.exceptions.ResultExceptionorg.dmd.dmc.DmcValueExceptionprotected void init()
throws org.dmd.util.exceptions.ResultException,
org.dmd.dmc.DmcValueException,
org.dmd.dmc.rules.DmcRuleExceptionSet,
org.dmd.dmc.DmcNameClashException
DmpServletPlugininit in class DmpServletPluginorg.dmd.dmc.rules.DmcRuleExceptionSetorg.dmd.dmc.DmcNameClashExceptionorg.dmd.util.exceptions.ResultExceptionorg.dmd.dmc.DmcValueExceptionpublic void start()
throws org.dmd.util.exceptions.ResultException,
org.dmd.dmc.DmcValueException
DmpServletPluginstart in class DmpServletPluginorg.dmd.util.exceptions.ResultExceptionorg.dmd.dmc.DmcValueExceptionpublic void shutdown()
DmpServletPluginshutdown in class DmpServletPluginprotected void processSetRequest(org.dmd.dmp.server.extended.SetRequest request)
protected void processCreateRequest(org.dmd.dmp.server.extended.CreateRequest request)
protected void processDeleteRequest(org.dmd.dmp.server.extended.DeleteRequest request)
public void addObject(org.dmd.dmw.DmwNamedObjectWrapper obj)
throws org.dmd.util.exceptions.ResultException
CacheIFpublic void dumpObjects(PrintStream ps)
CacheIFdumpObjects in interface CacheIFpublic org.dmd.dmw.DmwNamedObjectWrapper get(org.dmd.dmc.DmcObjectName name)
CacheIFpublic Collection<org.dmd.dmw.DmwHierarchicObjectWrapper> getNext(org.dmd.dmc.DmcHierarchicObjectName name)
public Collection<org.dmd.dmw.DmwHierarchicObjectWrapper> getAll(org.dmd.dmc.DmcHierarchicObjectName name)
public void create(org.dmd.dmw.DmwNamedObjectWrapper obj,
org.dmd.dmp.server.extended.Request request)
public void createAndNotify(org.dmd.dmw.DmwNamedObjectWrapper obj)
createAndNotify in interface CacheIFpublic void delete(org.dmd.dmw.DmwNamedObjectWrapper obj)
public void delete(org.dmd.dmc.DmcObjectName name,
org.dmd.dmp.server.extended.Request request)
throws org.dmd.util.exceptions.ResultException
public void deleteAndNotify(org.dmd.dmw.DmwNamedObjectWrapper obj)
deleteAndNotify in interface CacheIFpublic void deleteAndNotify(org.dmd.dmc.DmcObjectName name)
deleteAndNotify in interface CacheIFpublic void setAndNotify(org.dmd.dmw.DmwNamedObjectWrapper obj)
setAndNotify in interface CacheIFpublic void set(org.dmd.dmc.DmcObjectName name,
org.dmd.dms.generated.types.DmcTypeModifierMV modifier,
org.dmd.dmp.server.extended.Request request)
throws org.dmd.util.exceptions.ResultException
public void maintainIndex(org.dmd.dmc.DmcClassInfo ci)
CacheIFmaintainIndex in interface CacheIFci - The class info of the class from the DMSAGpublic boolean hasIndex(org.dmd.dmc.DmcClassInfo dci)
public int getIndexSize(org.dmd.dmc.DmcClassInfo ci)
getIndexSize in interface CacheIFci - the class whose index you want to check.public Collection<org.dmd.dmw.DmwNamedObjectWrapper> getIndex(org.dmd.dmc.DmcClassInfo ci)
public void handleObject(org.dmd.dmc.util.DmcUncheckedObject uco,
String infile,
int lineNumber)
throws org.dmd.util.exceptions.ResultException,
org.dmd.dmc.DmcValueException
handleObject in interface org.dmd.util.parsing.DmcUncheckedOIFHandlerIForg.dmd.util.exceptions.ResultExceptionorg.dmd.dmc.DmcValueExceptionpublic CacheRegistration register(SessionIF session)
CacheIFpublic org.dmd.dmc.DmcObject findNamedDMO(org.dmd.dmc.DmcObjectName name)
findNamedDMO in interface org.dmd.dmc.DmcNameResolverIFpublic org.dmd.dmc.DmcNamedObjectIF findNamedObject(org.dmd.dmc.DmcObjectName name)
findNamedObject in interface org.dmd.dmc.DmcNameResolverIFpublic org.dmd.dmc.DmcNamedObjectIF findNamedObject(org.dmd.dmc.DmcObjectName name,
int attributeID)
findNamedObject in interface org.dmd.dmc.DmcNameResolverIFpublic void queueSetRequest(org.dmd.dmp.server.extended.SetRequest request)
CacheIFqueueSetRequest in interface CacheIFrequest - the request to be processedpublic void queueCreateRequest(org.dmd.dmp.server.extended.CreateRequest request)
CacheIFqueueCreateRequest in interface CacheIFrequest - the request to be processedpublic void queueDeleteRequest(org.dmd.dmp.server.extended.DeleteRequest request)
CacheIFqueueDeleteRequest in interface CacheIFrequest - the request to be processedpublic void queueEvent(org.dmd.dmp.server.extended.DMPEvent event)
CacheIFqueueEvent in interface CacheIFevent - the event to be processedpublic long getNextListenerID()
getNextListenerID in interface CacheIFpublic Collection<org.dmd.dmw.DmwNamedObjectWrapper> addListener(CacheListener listener)
CacheIFaddListener in interface CacheIFlistener - the cache listenerpublic void removeListener(CacheListener listener)
CacheIFremoveListener in interface CacheIFlistener - the listener to be removed.public void addNameGenerator(NameGeneratorIF ng)
CacheIFaddNameGenerator in interface CacheIFpublic org.dmd.dmc.DmcNamedObjectIF findNamedObjectMayClash(org.dmd.dmc.DmcObject object,
org.dmd.dmc.DmcObjectName name,
org.dmd.dmc.DmcNameClashResolverIF resolver,
org.dmd.dmc.DmcAttributeInfo ai)
throws org.dmd.dmc.DmcValueException
findNamedObjectMayClash in interface org.dmd.dmc.DmcNameResolverWithClashSupportIForg.dmd.dmc.DmcValueExceptionpublic org.dmd.dmc.DmcNamedObjectIF resolveClash(org.dmd.dmc.DmcObject obj,
org.dmd.dmc.DmcAttributeInfo ai,
org.dmd.dmc.DmcNameClashObjectSet<?> ncos)
throws org.dmd.dmc.DmcValueException
resolveClash in interface org.dmd.dmc.DmcNameClashResolverIForg.dmd.dmc.DmcValueExceptionpublic void removeListenersForSession(SessionIF session)
CacheIFremoveListenersForSession in interface CacheIFCopyright © 2019. All rights reserved.