public class SharedResourcesI extends AbstractCloseableAmdServant implements _SharedResourcesOperations, BlitzOnly, ServiceFactoryAware, ParamsHelper.Acquirer
SharedResources
Modifier and Type | Field and Description |
---|---|
static long |
DEFAULT_TIMEOUT
If no value is passed to this instance, this is the time (1 hour)
which will be used for a script session.
|
Constructor and Description |
---|
SharedResourcesI(BlitzExecutor be,
TopicManager topicManager,
Registry registry,
ome.services.scripts.ScriptRepoHelper helper,
ParamsCache cache) |
SharedResourcesI(BlitzExecutor be,
TopicManager topicManager,
Registry registry,
ome.services.scripts.ScriptRepoHelper helper,
ParamsCache cache,
long waitMillis) |
SharedResourcesI(BlitzExecutor be,
TopicManager topicManager,
Registry registry,
ome.services.scripts.ScriptRepoHelper helper,
ParamsCache cache,
long waitMillis,
long timeout) |
Modifier and Type | Method and Description |
---|---|
InteractiveProcessorPrx |
acquireProcessor(Job submittedJob,
int seconds,
Ice.Current current)
Waits up to seconds to acquire a slot in a processor
which can handle the given job.
|
void |
addProcessor(ProcessorPrx proc,
Ice.Current __current)
Registers a
Processor for Storm notifications
so that other sessions can query whether or not a given
processor would accept a given task. |
boolean |
areTablesEnabled(Ice.Current __current)
Returns true if a
Tables service is active in the grid. |
RepositoryPrx |
getScriptRepository(Ice.Current __current)
Returns the single (possibly mirrored) script repository which makes
all official scripts available.
|
TablePrx |
newTable(long repo,
java.lang.String path,
Ice.Current __current)
Creates a new Format(""OMERO.tables"") file at the given path
on the given repository.
|
TablePrx |
openTable(OriginalFile file,
Ice.Current __current)
Returns a Table instance or null.
|
protected void |
postClose(Ice.Current current)
Should not throw any exceptions which should be detected by clients
since it is called in a finally block after the client thread has been
released.
|
protected void |
preClose(Ice.Current current) |
void |
removeProcessor(ProcessorPrx proc,
Ice.Current __current)
Unregisters a
Processor from Storm
notifications. |
RepositoryMap |
repositories(Ice.Current current)
Returns a map between Repository descriptions (omero::model::OriginalFile
instances) and RepositoryPrx instances (possibly null).
|
void |
setServiceFactory(ServiceFactoryI sf) |
close_async, close
activate_async, applyHardWiredInterceptors, callInvokerOnMappedArgs, callInvokerOnRawArgs, executorWorkCall, getCurrentEventContext_async, onSetOmeroContext, passivate_async, runnableCall, safeRunnableCall, setApplicationContext, setHolder
public static final long DEFAULT_TIMEOUT
public SharedResourcesI(BlitzExecutor be, TopicManager topicManager, Registry registry, ome.services.scripts.ScriptRepoHelper helper, ParamsCache cache)
public SharedResourcesI(BlitzExecutor be, TopicManager topicManager, Registry registry, ome.services.scripts.ScriptRepoHelper helper, ParamsCache cache, long waitMillis)
public SharedResourcesI(BlitzExecutor be, TopicManager topicManager, Registry registry, ome.services.scripts.ScriptRepoHelper helper, ParamsCache cache, long waitMillis, long timeout)
public void setServiceFactory(ServiceFactoryI sf) throws ServerError
setServiceFactory
in interface ServiceFactoryAware
ServerError
protected void preClose(Ice.Current current)
preClose
in class AbstractCloseableAmdServant
protected void postClose(Ice.Current current)
AbstractCloseableAmdServant
postClose
in class AbstractCloseableAmdServant
public RepositoryPrx getScriptRepository(Ice.Current __current) throws ServerError
_SharedResourcesOperations
getScriptRepository
in interface _SharedResourcesOperations
__current
- The Current object for the invocation.ServerError
public RepositoryMap repositories(Ice.Current current) throws ServerError
_SharedResourcesOperations
repositories
in interface _SharedResourcesOperations
current
- The Current object for the invocation.ServerError
public boolean areTablesEnabled(Ice.Current __current) throws ServerError
_SharedResourcesOperations
Tables
service is active in the grid.
If this value is false, then all calls to #ewTable
or openTable
will either fail or return null (possibly
blocking while waiting for a service to startup)areTablesEnabled
in interface _SharedResourcesOperations
__current
- The Current object for the invocation.ServerError
public TablePrx newTable(long repo, java.lang.String path, Ice.Current __current) throws ServerError
_SharedResourcesOperations
newTable
in interface _SharedResourcesOperations
__current
- The Current object for the invocation.ServerError
public TablePrx openTable(OriginalFile file, Ice.Current __current) throws ServerError
_SharedResourcesOperations
openTable
in interface _SharedResourcesOperations
__current
- The Current object for the invocation.ServerError
public InteractiveProcessorPrx acquireProcessor(Job submittedJob, int seconds, Ice.Current current) throws ServerError
_SharedResourcesOperations
acquireProcessor
in interface _SharedResourcesOperations
acquireProcessor
in interface ParamsHelper.Acquirer
current
- The Current object for the invocation.ServerError
public void addProcessor(ProcessorPrx proc, Ice.Current __current) throws ServerError
_SharedResourcesOperations
Processor
for Storm notifications
so that other sessions can query whether or not a given
processor would accept a given task.addProcessor
in interface _SharedResourcesOperations
__current
- The Current object for the invocation.ServerError
public void removeProcessor(ProcessorPrx proc, Ice.Current __current) throws ServerError
_SharedResourcesOperations
Processor
from Storm
notifications. If the processor was not already registered via
addProcessor
this is a no-op.removeProcessor
in interface _SharedResourcesOperations
__current
- The Current object for the invocation.ServerError