Package org.pentaho.di.shared
Class MemorySharedObjectsIO
java.lang.Object
org.pentaho.di.shared.MemorySharedObjectsIO
- All Implemented Interfaces:
SharedObjectsIO
Holds shared objects in memory.
Note that any shared objects stored in this cannot participate in the XmlHander cache. That is, they must pass 'false' to XMLHandler.getSubNodeByNr().
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.pentaho.di.shared.SharedObjectsIO
SharedObjectsIO.SharedObjectType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidclear()voidRemove all the connections of a given type.voidClear any cached objects in the SharedObjectsIOvoidRemove the SharedObject for the type and name.getSharedObject(String type, String name) Return the node for the given SharedObject type and name.getSharedObjects(String type) Get the collection of SharedObjects of the given typevoidlock()Lock the SharedObjectsIO for exclusive access.voidsaveSharedObject(String type, String name, Node node) Save the SharedObject in memory.voidunlock()Unlock the SharedObjectsIO after exclusive access is no longer needed.
-
Constructor Details
-
MemorySharedObjectsIO
public MemorySharedObjectsIO()
-
-
Method Details
-
delete
Remove the SharedObject for the type and name. The lookup for the SharedObject using the name will be case-insensitive- Specified by:
deletein interfaceSharedObjectsIO- Parameters:
type- The type is shared object type for example, "connection", "slaveserver", "partitionschema" and clusterschema"name- The name is the name of the sharedObject- Throws:
KettleException
-
clear
Description copied from interface:SharedObjectsIORemove all the connections of a given type.- Specified by:
clearin interfaceSharedObjectsIO- Parameters:
type- Type to clear- Throws:
KettleException
-
clear
public void clear() -
lock
public void lock()Description copied from interface:SharedObjectsIOLock the SharedObjectsIO for exclusive access. This lock should be held while interacting with any Node objects returned by this SharedObjectsIO.- Specified by:
lockin interfaceSharedObjectsIO
-
unlock
public void unlock()Description copied from interface:SharedObjectsIOUnlock the SharedObjectsIO after exclusive access is no longer needed.- Specified by:
unlockin interfaceSharedObjectsIO
-
assertUnlocked
public void assertUnlocked() -
clearCache
public void clearCache()Description copied from interface:SharedObjectsIOClear any cached objects in the SharedObjectsIO- Specified by:
clearCachein interfaceSharedObjectsIO