Package org.pentaho.di.shared
Interface SharedObjectsIO
- All Known Implementing Classes:
DelegatingSharedObjectsIO,MemorySharedObjectsIO,VfsSharedObjectsIO
public interface SharedObjectsIO
This interface provide methods to retrieve and save the shared objects defined in shared.xml irrespective of
where the shared objects are persisted.
Concurrency note: Because the Node class is completely non-thread-safe, even for read-only access, callers must use
lock() before calling any method that operates on Nodes, and unlock() after all interactions with those Node objects
are complete. Non-Node API methods are thread-safe.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoidRemove all the connections of a given type.voidClear any cached objects in the SharedObjectsIOvoidDelete the SharedObject for the given type and name.static StringfindSharedObjectIgnoreCase(String name, Set<String> existingKeys) getSharedObject(String type, String name) Return the Shared Object Node for the given 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 node for the type and name.voidunlock()Unlock the SharedObjectsIO after exclusive access is no longer needed.
-
Method Details
-
delete
Delete the SharedObject for the given type and name. The delete operation will be case-insensitive.- 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
Remove all the connections of a given type.- Parameters:
type- Type to clear- Throws:
KettleException
-
clearCache
void clearCache()Clear any cached objects in the SharedObjectsIO -
lock
void lock()Lock the SharedObjectsIO for exclusive access. This lock should be held while interacting with any Node objects returned by this SharedObjectsIO. -
unlock
void unlock()Unlock the SharedObjectsIO after exclusive access is no longer needed.