public class RawFileStoreI extends AbstractCloseableAmdServant implements _RawFileStoreOperations, ServiceFactoryAware, TieAware
RawFileStore
Constructor and Description |
---|
RawFileStoreI(ome.api.RawFileStore service,
BlitzExecutor be) |
Modifier and Type | Method and Description |
---|---|
boolean |
__redirect(long fileId,
_RawFileStoreTie rfsTie,
Ice.Current current) |
void |
exists_async(AMD_RawFileStore_exists __cb,
Ice.Current __current)
Checks to see if a raw file exists with the file ID that
the service was initialized with.
|
void |
getFileId_async(AMD_RawFileStore_getFileId __cb,
Ice.Current __current)
Returns the current file id or null if none has been set.
|
ServiceFactoryI |
getServiceFactory() |
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 |
read_async(AMD_RawFileStore_read __cb,
long position,
int length,
Ice.Current __current)
Reads
length bytes of data at the
position from the raw file into an array of
bytes. |
void |
save_async(AMD_RawFileStore_save __cb,
Ice.Current __current)
Saves the
OriginalFile associated with
the service if it has been modified. |
void |
setFileId_async(AMD_RawFileStore_setFileId __cb,
long fileId,
Ice.Current __current)
This method manages the state of the service.
|
void |
setServiceFactory(ServiceFactoryI sf) |
void |
setTie(Ice.TieBase tie) |
void |
size_async(AMD_RawFileStore_size __cb,
Ice.Current __current)
Returns the size of the file on disk (not as stored in the
database since that value will only be updated on
save . |
void |
truncate_async(AMD_RawFileStore_truncate __cb,
long length,
Ice.Current __current)
Limits the size of a file to the given length.
|
void |
write_async(AMD_RawFileStore_write __cb,
byte[] buf,
long position,
int length,
Ice.Current __current)
Writes
length bytes of data from the specified
buf byte array starting at at
position to the raw file. |
close_async, close
activate_async, applyHardWiredInterceptors, callInvokerOnMappedArgs, callInvokerOnRawArgs, executorWorkCall, getCurrentEventContext_async, onSetOmeroContext, passivate_async, runnableCall, safeRunnableCall, setApplicationContext, setHolder
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
activate_async, close_async, getCurrentEventContext_async, passivate_async
public RawFileStoreI(ome.api.RawFileStore service, BlitzExecutor be)
public void setServiceFactory(ServiceFactoryI sf) throws ServerError
setServiceFactory
in interface ServiceFactoryAware
ServerError
public ServiceFactoryI getServiceFactory() throws ServerError
ServerError
public void setTie(Ice.TieBase tie) throws ServerError
setTie
in interface TieAware
ServerError
public void exists_async(AMD_RawFileStore_exists __cb, Ice.Current __current) throws ServerError
_RawFileStoreOperations
exists_async
in interface _RawFileStoreOperations
__cb
- The callback object for the operation.__current
- The Current object for the invocation.ServerError
public void read_async(AMD_RawFileStore_read __cb, long position, int length, Ice.Current __current) throws ServerError
_RawFileStoreOperations
length
bytes of data at the
position
from the raw file into an array of
bytes.read_async
in interface _RawFileStoreOperations
__cb
- The callback object for the operation.__current
- The Current object for the invocation.ServerError
public void getFileId_async(AMD_RawFileStore_getFileId __cb, Ice.Current __current) throws ServerError
_RawFileStoreOperations
getFileId_async
in interface _RawFileStoreOperations
__cb
- The callback object for the operation.__current
- The Current object for the invocation.ServerError
public void setFileId_async(AMD_RawFileStore_setFileId __cb, long fileId, Ice.Current __current) throws ServerError
_RawFileStoreOperations
SecurityViolation
if for the
current user context either the file is not readable or a
omero.constants.permissions.BINARYACCESS
restriction is
in place.setFileId_async
in interface _RawFileStoreOperations
__cb
- The callback object for the operation.__current
- The Current object for the invocation.ServerError
public void size_async(AMD_RawFileStore_size __cb, Ice.Current __current) throws ServerError
_RawFileStoreOperations
save
. If the file has not yet been written to, and
therefore does not exist, a ResourceError
will be thrown.size_async
in interface _RawFileStoreOperations
__cb
- The callback object for the operation.__current
- The Current object for the invocation.ServerError
public void truncate_async(AMD_RawFileStore_truncate __cb, long length, Ice.Current __current) throws ServerError
_RawFileStoreOperations
truncate_async
in interface _RawFileStoreOperations
__cb
- The callback object for the operation.__current
- The Current object for the invocation.ServerError
public void write_async(AMD_RawFileStore_write __cb, byte[] buf, long position, int length, Ice.Current __current) throws ServerError
_RawFileStoreOperations
length
bytes of data from the specified
buf
byte array starting at at
position
to the raw file.write_async
in interface _RawFileStoreOperations
__cb
- The callback object for the operation.__current
- The Current object for the invocation.ServerError
public void save_async(AMD_RawFileStore_save __cb, Ice.Current __current) throws ServerError
_RawFileStoreOperations
OriginalFile
associated with
the service if it has been modified. The returned valued
should replace all instances of the
OriginalFile
in the client.
If save has not been called, RawFileStore
instances will save the OriginalFile
object associated with it on close
.
See also ticket 1651
and ticket 2161.save_async
in interface _RawFileStoreOperations
__cb
- The callback object for the operation.__current
- The Current object for the invocation.ServerError
protected void preClose(Ice.Current current) throws java.lang.Throwable
preClose
in class AbstractCloseableAmdServant
java.lang.Throwable
protected void postClose(Ice.Current current)
AbstractCloseableAmdServant
postClose
in class AbstractCloseableAmdServant
public boolean __redirect(long fileId, _RawFileStoreTie rfsTie, Ice.Current current) throws ServerError
ServerError