java.lang.Object
org.apache.derby.impl.store.raw.data.RFResource
- All Implemented Interfaces:
- org.apache.derby.iapi.store.access.FileResource
- public class RFResource
- extends java.lang.Object
- implements org.apache.derby.iapi.store.access.FileResource
|
Method Summary |
long |
add(java.lang.String name,
java.io.InputStream source)
Add a file resource, copying from the input stream. |
org.apache.derby.io.StorageFile |
getAsFile(java.lang.String name)
Get the File handle to a file resource. |
org.apache.derby.io.StorageFile |
getAsFile(java.lang.String name,
long generationId)
Get the File handle to a file resource. |
java.io.InputStream |
getAsStream(java.lang.String name)
Get the file resource as a stream. |
java.io.InputStream |
getAsStream(java.lang.String name,
long generationId)
Get the file resource as a stream. |
char |
getSeparatorChar()
|
protected org.apache.derby.iapi.services.daemon.Serviceable |
privRemoveFile(org.apache.derby.io.StorageFile file)
|
protected RemoveFileOperation |
privRemoveFileOperation(java.lang.String name,
long generationId,
boolean removeAtOnce)
|
void |
purgeOldGenerations(org.apache.derby.iapi.store.access.DatabaseInstant purgeTo)
Purge old generations that were removed or replaced
before the database instant provided. |
void |
remove(java.lang.String name,
long currentGenerationId,
boolean purgeOnCommit)
Remove the current generation of a file resource from
the database. |
long |
replace(java.lang.String name,
long currentGenerationId,
java.io.InputStream source,
boolean purgeOnCommit)
Replace a file resource with a new version. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
factory
protected final BaseDataFileFactory factory
RFResource
public RFResource(BaseDataFileFactory dataFactory)
add
public long add(java.lang.String name,
java.io.InputStream source)
throws org.apache.derby.iapi.error.StandardException
- Description copied from interface:
org.apache.derby.iapi.store.access.FileResource
- Add a file resource, copying from the input stream.
The InputStream will be closed by this method.
- Specified by:
add in interface org.apache.derby.iapi.store.access.FileResource
remove
public void remove(java.lang.String name,
long currentGenerationId,
boolean purgeOnCommit)
throws org.apache.derby.iapi.error.StandardException
- Description copied from interface:
org.apache.derby.iapi.store.access.FileResource
- Remove the current generation of a file resource from
the database.
- Specified by:
remove in interface org.apache.derby.iapi.store.access.FileResource
replace
public long replace(java.lang.String name,
long currentGenerationId,
java.io.InputStream source,
boolean purgeOnCommit)
throws org.apache.derby.iapi.error.StandardException
- Description copied from interface:
org.apache.derby.iapi.store.access.FileResource
- Replace a file resource with a new version.
The InputStream will be closed by this method.
- Specified by:
replace in interface org.apache.derby.iapi.store.access.FileResource
getAsFile
public org.apache.derby.io.StorageFile getAsFile(java.lang.String name,
long generationId)
- Description copied from interface:
org.apache.derby.iapi.store.access.FileResource
- Get the File handle to a file resource. In some situations
higher level code can make optimisations if it can access
a file as a File, rather than an output stream. If this call
returns null then the resouce is not accessable as a file
(e.g. the database is in a zip file).
- Specified by:
getAsFile in interface org.apache.derby.iapi.store.access.FileResource
getAsFile
public org.apache.derby.io.StorageFile getAsFile(java.lang.String name)
- Description copied from interface:
org.apache.derby.iapi.store.access.FileResource
- Get the File handle to a file resource. In some situations
higher level code can make optimisations if it can access
a file as a File, rather than an output stream. If this call
returns null then the resouce is not accessable as a file
(e.g. the database is in a zip file).
- Specified by:
getAsFile in interface org.apache.derby.iapi.store.access.FileResource
getAsStream
public java.io.InputStream getAsStream(java.lang.String name,
long generationId)
throws java.io.IOException
- Description copied from interface:
org.apache.derby.iapi.store.access.FileResource
- Get the file resource as a stream.
- Specified by:
getAsStream in interface org.apache.derby.iapi.store.access.FileResource
getAsStream
public java.io.InputStream getAsStream(java.lang.String name)
throws java.io.IOException
- Description copied from interface:
org.apache.derby.iapi.store.access.FileResource
- Get the file resource as a stream.
- Specified by:
getAsStream in interface org.apache.derby.iapi.store.access.FileResource
purgeOldGenerations
public void purgeOldGenerations(org.apache.derby.iapi.store.access.DatabaseInstant purgeTo)
- Description copied from interface:
org.apache.derby.iapi.store.access.FileResource
- Purge old generations that were removed or replaced
before the database instant provided.
- Specified by:
purgeOldGenerations in interface org.apache.derby.iapi.store.access.FileResource
getSeparatorChar
public char getSeparatorChar()
- Specified by:
getSeparatorChar in interface org.apache.derby.iapi.store.access.FileResource
privRemoveFile
protected org.apache.derby.iapi.services.daemon.Serviceable privRemoveFile(org.apache.derby.io.StorageFile file)
privRemoveFileOperation
protected RemoveFileOperation privRemoveFileOperation(java.lang.String name,
long generationId,
boolean removeAtOnce)