|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.impl.store.raw.data.RFResource
Field Summary | |
protected BaseDataFileFactory |
factory
|
Constructor Summary | |
RFResource(BaseDataFileFactory dataFactory)
|
Method Summary | |
long |
add(java.lang.String name,
java.io.InputStream source)
Add a file resource, copying from the input stream. |
StorageFile |
getAsFile(java.lang.String name)
Get the File handle to a file resource. |
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 Serviceable |
privRemoveFile(StorageFile file)
|
protected RemoveFileOperation |
privRemoveFileOperation(java.lang.String name,
long generationId,
boolean removeAtOnce)
|
void |
purgeOldGenerations(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 |
Field Detail |
protected final BaseDataFileFactory factory
Constructor Detail |
public RFResource(BaseDataFileFactory dataFactory)
Method Detail |
public long add(java.lang.String name, java.io.InputStream source) throws StandardException
FileResource
add
in interface FileResource
name
- the name of the file resource.source
- an input stream for reading the content of
the file resource.
StandardException
- OopsFileResource.add(java.lang.String, java.io.InputStream)
public void remove(java.lang.String name, long currentGenerationId, boolean purgeOnCommit) throws StandardException
FileResource
remove
in interface FileResource
name
- the name of the fileResource to remove.purgeOnCommit
- true means purge the fileResource
when the current transaction commits. false means retain
the file resource for use by replication.
StandardException
- OopsFileResource.remove(java.lang.String, long, boolean)
public long replace(java.lang.String name, long currentGenerationId, java.io.InputStream source, boolean purgeOnCommit) throws StandardException
FileResource
The InputStream will be closed by this method.
replace
in interface FileResource
name
- the name of the file resource.source
- an input stream for reading the content of
the file resource.purgeOnCommit
- true means purge the existing version of
fileResource when the current transaction commits. false
means retain the existing version for use by replication.
StandardException
- OopsFileResource.replace(java.lang.String, long, java.io.InputStream, boolean)
public StorageFile getAsFile(java.lang.String name, long generationId)
FileResource
getAsFile
in interface FileResource
name
- The name of the fileResourcegenerationId
- the generationId of the fileResource
FileResource.getAsFile(java.lang.String, long)
public StorageFile getAsFile(java.lang.String name)
FileResource
getAsFile
in interface FileResource
name
- The name of the fileResource
FileResource.getAsFile(java.lang.String, long)
public java.io.InputStream getAsStream(java.lang.String name, long generationId) throws java.io.IOException
FileResource
getAsStream
in interface FileResource
java.io.IOException
- trouble accessing file.FileResource.getAsStream(java.lang.String, long)
public java.io.InputStream getAsStream(java.lang.String name) throws java.io.IOException
FileResource
getAsStream
in interface FileResource
java.io.IOException
- trouble accessing file.FileResource.getAsStream(java.lang.String, long)
public void purgeOldGenerations(DatabaseInstant purgeTo)
FileResource
purgeOldGenerations
in interface FileResource
FileResource.purgeOldGenerations(org.apache.derby.iapi.store.access.DatabaseInstant)
public char getSeparatorChar()
getSeparatorChar
in interface FileResource
protected Serviceable privRemoveFile(StorageFile file)
protected RemoveFileOperation privRemoveFileOperation(java.lang.String name, long generationId, boolean removeAtOnce)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |