Class RFResource
- java.lang.Object
-
- org.apache.derby.impl.store.raw.data.RFResource
-
- All Implemented Interfaces:
FileResource
class RFResource extends java.lang.Object implements FileResource
-
-
Field Summary
Fields Modifier and Type Field Description private BaseDataFileFactory
factory
-
Fields inherited from interface org.apache.derby.iapi.store.access.FileResource
JAR_DIRECTORY_NAME
-
-
Constructor Summary
Constructors Constructor Description RFResource(BaseDataFileFactory dataFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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, long generationId)
Get the StorageFile for a file resource.char
getSeparatorChar()
void
remove(java.lang.String name, long currentGenerationId)
Remove the current generation of a file resource from the database.void
removeJarDir(java.lang.String f)
During hard upgrade to <= 10.9, remove a jar directory (at post-commit time) from the database.long
replace(java.lang.String name, long currentGenerationId, java.io.InputStream source)
Replace a file resource with a new version.
-
-
-
Field Detail
-
factory
private final BaseDataFileFactory factory
-
-
Constructor Detail
-
RFResource
RFResource(BaseDataFileFactory dataFactory)
-
-
Method Detail
-
add
public long add(java.lang.String name, java.io.InputStream source) throws StandardException
Description copied from interface:FileResource
Add a file resource, copying from the input stream. The InputStream will be closed by this method.- Specified by:
add
in interfaceFileResource
- Parameters:
name
- the name of the file resource.source
- an input stream for reading the content of the file resource.- Returns:
- the generationId for the file resource. This quantity increases when you replace the file resource.
- Throws:
StandardException
- Oops- See Also:
FileResource.add(java.lang.String, java.io.InputStream)
-
removeJarDir
public void removeJarDir(java.lang.String f) throws StandardException
Description copied from interface:FileResource
During hard upgrade to <= 10.9, remove a jar directory (at post-commit time) from the database.- Specified by:
removeJarDir
in interfaceFileResource
- Throws:
StandardException
- if an error occurs- See Also:
FileResource.removeJarDir(java.lang.String)
-
remove
public void remove(java.lang.String name, long currentGenerationId) throws StandardException
Description copied from interface:FileResource
Remove the current generation of a file resource from the database.- Specified by:
remove
in interfaceFileResource
- Parameters:
name
- the name of the fileResource to remove.- Throws:
StandardException
- Oops- See Also:
FileResource.remove(java.lang.String, long)
-
replace
public long replace(java.lang.String name, long currentGenerationId, java.io.InputStream source) throws StandardException
Description copied from interface:FileResource
Replace a file resource with a new version.The InputStream will be closed by this method.
- Specified by:
replace
in interfaceFileResource
- Parameters:
name
- the name of the file resource.source
- an input stream for reading the content of the file resource.- Returns:
- the generationId for the new 'current' version of the file resource.
- Throws:
StandardException
- Oops- See Also:
FileResource.replace(java.lang.String, long, java.io.InputStream)
-
getAsFile
public StorageFile getAsFile(java.lang.String name, long generationId)
Description copied from interface:FileResource
Get the StorageFile for a file resource.- Specified by:
getAsFile
in interfaceFileResource
- Parameters:
name
- The name of the fileResourcegenerationId
- the generationId of the fileResource- Returns:
- A StorageFile object representing the file.
- See Also:
FileResource.getAsFile(java.lang.String, long)
-
getSeparatorChar
public char getSeparatorChar()
- Specified by:
getSeparatorChar
in interfaceFileResource
- Returns:
- the separator character to be used in file names.
-
-