Package com.illumon.iris.db.util.scripts
Class ConsoleScriptPathLoader
java.lang.Object
com.illumon.iris.db.util.scripts.ConsoleScriptPathLoader
- All Implemented Interfaces:
- ScriptPathLoader
public class ConsoleScriptPathLoader extends Object implements ScriptPathLoader
This loader loads *only* using IrisDbGroovySession.findScript(String script).
 Consistency locking and refresh methods are no-ops.
- 
Constructor SummaryConstructors Constructor Description ConsoleScriptPathLoader()
- 
Method SummaryModifier and Type Method Description voidclose()Free resources associated with this loader.Set<String>getAvailableScriptDisplayPaths()StringgetScriptBodyByDisplayPath(String displayPath)StringgetScriptBodyByRelativePath(String relativePath)voidlock()Acquire a read lock.voidrefresh()Refresh the loader internally.voidunlock()Release a previously acquired read lock.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.illumon.iris.db.util.scripts.ScriptPathLoadergetAvailableScriptDisplayPaths, getScriptBodyByDisplayPath, getScriptBodyByRelativePath, getState
- 
Constructor Details- 
ConsoleScriptPathLoaderpublic ConsoleScriptPathLoader()
 
- 
- 
Method Details- 
lockpublic void lock()Description copied from interface:ScriptPathLoaderAcquire a read lock. Use before invoking any of the get* methods, and hold for as long as consistency is required for this loader.- Specified by:
- lockin interface- ScriptPathLoader
 
- 
unlockpublic void unlock()Description copied from interface:ScriptPathLoaderRelease a previously acquired read lock.- Specified by:
- unlockin interface- ScriptPathLoader
 
- 
getAvailableScriptDisplayPaths- Specified by:
- getAvailableScriptDisplayPathsin interface- ScriptPathLoader
- Returns:
- The display paths currently available from this loader.
 
- 
getScriptBodyByDisplayPath- Specified by:
- getScriptBodyByDisplayPathin interface- ScriptPathLoader
- Parameters:
- displayPath- The display path to load a script for.
- Returns:
- The body of the requested script.
- Throws:
- IOException- If a problem occurred reading the script body.
 
- 
getScriptBodyByRelativePath- Specified by:
- getScriptBodyByRelativePathin interface- ScriptPathLoader
- Parameters:
- relativePath- The relative path to load a script for.
- Returns:
- The body of the requested script.
- Throws:
- IOException- If a problem occurred reading the script body.
 
- 
refreshpublic void refresh()Description copied from interface:ScriptPathLoaderRefresh the loader internally. Will respect existing read locks.- Specified by:
- refreshin interface- ScriptPathLoader
 
- 
closepublic void close()Description copied from interface:ScriptPathLoaderFree resources associated with this loader.- Specified by:
- closein interface- ScriptPathLoader
 
 
-