Java Doc for DataFactory.java in  » Database-DBMS » db-derby-10.2 » org » apache » derby » iapi » store » raw » data » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database DBMS » db derby 10.2 » org.apache.derby.iapi.store.raw.data 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.derby.iapi.store.raw.data.DataFactory

All known Subclasses:   org.apache.derby.impl.store.raw.data.BaseDataFileFactory,
DataFactory
public interface DataFactory extends Corruptable(Code)


Field Summary
final public static  StringDB_EX_LOCKFILE_NAME
    
final public static  StringDB_LOCKFILE_NAME
    
final public static  StringMODULE
    
final public static  StringTEMP_SEGMENT_NAME
    


Method Summary
public  longaddAndLoadStreamContainer(RawTransaction t, long segmentId, Properties tableProperties, RowSource rowSource)
     Create and load a stream container.
public  longaddContainer(RawTransaction t, long segmentId, long containerid, int mode, Properties tableProperties, int temporaryFlag)
     Add a container.
Parameters:
  t - the transaction that is creating the container
Parameters:
  segmentId - the segment where the container is to go
Parameters:
  mode - whether or not to LOGGED or not.
public  voidbackupDataFiles(Transaction rt, File backupDir)
     Back up the data segment of the database.
public  voidcheckpoint()
    
public  voidcreateFinished()
    
public  intdecrypt(byte[] ciphertext, int offset, int length, byte[] cleartext, int outputOffset)
     Decrypt cleartext from ciphertext.
public  voiddropContainer(RawTransaction t, ContainerKey containerId)
    
public  voiddropStreamContainer(RawTransaction t, long segmentId, long containerId)
     Drop and remove a stream container.
public  intencrypt(byte[] cleartext, int offset, int length, byte[] ciphertext, int outputOffset, boolean newEngine)
     Encrypt cleartext into ciphertext.
public  voidencryptAllContainers(RawTransaction t)
     Encrypt all the containers in the data segment.
public  voidfreezePersistentStore()
    
public  long[]getCacheStats(String cacheName)
    
public  intgetEncryptionBlockSize()
    
public  FileResourcegetFileHandler()
     Get an object to handle non-transactional files.
public  UUIDgetIdentifier()
     Return the identifier that uniquely identifies this raw store at runtime. This identifier is to be used as part of the lokcing key for objects locked in the raw store by value (e.g.
 longgetMaxContainerId()
     Return an id which can be used to create a container.

Return an id number with is greater than any existing container in the current database.

public  StorageFactorygetStorageFactory()
    
public  voididle()
    
public  booleanisReadOnly()
     Is the store read-only.
public  ContainerHandleopenContainer(RawTransaction t, ContainerKey containerId, LockingPolicy locking, int mode)
     Open a container that is not droped.
Parameters:
  t - the raw transaction that is opening the container
Parameters:
  containerId - the container's identity
Parameters:
  locking - the locking policy
Parameters:
  mode - see the different mode in @see ContainerHandlethen will return a null handle if the container is dropped.
public  RawContainerHandleopenDroppedContainer(RawTransaction t, ContainerKey containerId, LockingPolicy locking, int mode)
     Open a container that may have been dropped. Only internal raw store code should call this, e.g.
public  StreamContainerHandleopenStreamContainer(RawTransaction t, long segmentId, long containerId, boolean hold)
     Open a stream container.
public  voidpostRecovery()
     Called after recovery is performed.
public  voidreCreateContainerForRedoRecovery(RawTransaction t, long segmentId, long containerId, ByteArray containerInfo)
     re-Create a container during redo recovery.
public  intreclaimSpace(Serviceable work, ContextManager contextMgr)
     Reclaim space used by this factory.
public  voidremoveDroppedContainerFileStubs(LogInstant redoLWM)
     This function is called after a checkpoint to remove the stub files thar are not required during recovery.
public  voidremoveOldVersionOfContainers(boolean inRecovery)
    
public  voidremoveStubsOK()
     Tell the data factory it is OK to remove committed deleted containers when the data factory shuts down.
public  voidresetCacheStats(String cacheName)
    
public  voidsetDatabaseEncrypted()
    
public  voidsetRawStoreFactory(RawStoreFactory rsf, boolean create, Properties properties)
    
public  voidstop()
    
public  voidunfreezePersistentStore()
    
public  voidwriteFinished()
     Backup restore - write finished, if this is the last writer, allow the persistent store to proceed.
public  voidwriteInProgress()
     Backup restore - don't allow the persistent store to be frozen - or if it is already frozen, block.

Field Detail
DB_EX_LOCKFILE_NAME
final public static String DB_EX_LOCKFILE_NAME(Code)



DB_LOCKFILE_NAME
final public static String DB_LOCKFILE_NAME(Code)
The database lock



MODULE
final public static String MODULE(Code)



TEMP_SEGMENT_NAME
final public static String TEMP_SEGMENT_NAME(Code)
The temporary segment is called "tmp"





Method Detail
addAndLoadStreamContainer
public long addAndLoadStreamContainer(RawTransaction t, long segmentId, Properties tableProperties, RowSource rowSource) throws StandardException(Code)
Create and load a stream container.
Parameters:
  t - the transaction that is creating the container
Parameters:
  segmentId - the segment where the container is to go
Parameters:
  tableProperties - properties of the container that is persistentlystored throughout the lifetime of the container
Parameters:
  rowSource - the data to load the container with the containerId of the newly created stream container
exception:
  StandardException - Standard Cloudscape Error policy



addContainer
public long addContainer(RawTransaction t, long segmentId, long containerid, int mode, Properties tableProperties, int temporaryFlag) throws StandardException(Code)
Add a container.
Parameters:
  t - the transaction that is creating the container
Parameters:
  segmentId - the segment where the container is to go
Parameters:
  mode - whether or not to LOGGED or not. The effect of this modeis only for this addContainer call, not persisently storedthroughout the lifetime of the container
Parameters:
  tableProperties - properties of the container that is persistentlystored throughout the lifetime of the container the containerId of the newly created container
exception:
  StandardException - Standard Cloudscape Error policy



backupDataFiles
public void backupDataFiles(Transaction rt, File backupDir) throws StandardException(Code)
Back up the data segment of the database.



checkpoint
public void checkpoint() throws StandardException(Code)



createFinished
public void createFinished() throws StandardException(Code)
Database creation finished
exception:
  StandardException - Standard cloudscape exception policy.



decrypt
public int decrypt(byte[] ciphertext, int offset, int length, byte[] cleartext, int outputOffset) throws StandardException(Code)
Decrypt cleartext from ciphertext.
See Also:   org.apache.derby.iapi.services.crypto.CipherProvider.decrypt
exception:
  StandardException - Standard Cloudscape Error Policy



dropContainer
public void dropContainer(RawTransaction t, ContainerKey containerId) throws StandardException(Code)



dropStreamContainer
public void dropStreamContainer(RawTransaction t, long segmentId, long containerId) throws StandardException(Code)
Drop and remove a stream container.
exception:
  StandardException - Standard cloudscape exception policy



encrypt
public int encrypt(byte[] cleartext, int offset, int length, byte[] ciphertext, int outputOffset, boolean newEngine) throws StandardException(Code)
Encrypt cleartext into ciphertext.
See Also:   org.apache.derby.iapi.services.crypto.CipherProvider.encrypt
exception:
  StandardException - Standard Cloudscape Error Policy



encryptAllContainers
public void encryptAllContainers(RawTransaction t) throws StandardException(Code)
Encrypt all the containers in the data segment.
Parameters:
  t - the transaction that is encrypting the containers.
exception:
  StandardException - Standard Derby Error Policy



freezePersistentStore
public void freezePersistentStore() throws StandardException(Code)
Backup restore - stop writing dirty pages or container to disk
exception:
  StandardException - Standard Cloudscape error policy



getCacheStats
public long[] getCacheStats(String cacheName)(Code)
Get cache statistics for the specified cache



getEncryptionBlockSize
public int getEncryptionBlockSize()(Code)
Return the encryption block size used by the algorithm at time of encrypted database creation



getFileHandler
public FileResource getFileHandler()(Code)
Get an object to handle non-transactional files.



getIdentifier
public UUID getIdentifier()(Code)
Return the identifier that uniquely identifies this raw store at runtime. This identifier is to be used as part of the lokcing key for objects locked in the raw store by value (e.g. Containers).



getMaxContainerId
long getMaxContainerId() throws StandardException(Code)
Return an id which can be used to create a container.

Return an id number with is greater than any existing container in the current database. Caller will use this to allocate future container numbers - most likely caching the value and then incrementing it as it is used.

The an id which can be used to create a container.
exception:
  StandardException - Standard exception policy.




getStorageFactory
public StorageFactory getStorageFactory()(Code)
The StorageFactory used by this dataFactory



idle
public void idle() throws StandardException(Code)



isReadOnly
public boolean isReadOnly()(Code)
Is the store read-only.



openContainer
public ContainerHandle openContainer(RawTransaction t, ContainerKey containerId, LockingPolicy locking, int mode) throws StandardException(Code)
Open a container that is not droped.
Parameters:
  t - the raw transaction that is opening the container
Parameters:
  containerId - the container's identity
Parameters:
  locking - the locking policy
Parameters:
  mode - see the different mode in @see ContainerHandlethen will return a null handle if the container is dropped. the handle to the opened container
exception:
  StandardException - Standard Cloudscape error policy



openDroppedContainer
public RawContainerHandle openDroppedContainer(RawTransaction t, ContainerKey containerId, LockingPolicy locking, int mode) throws StandardException(Code)
Open a container that may have been dropped. Only internal raw store code should call this, e.g. recovery.
See Also:   DataFactory.openContainer
exception:
  StandardException - Standard Cloudscape error policy



openStreamContainer
public StreamContainerHandle openStreamContainer(RawTransaction t, long segmentId, long containerId, boolean hold) throws StandardException(Code)
Open a stream container. a valid StreamContainerHandle or null if the container does not exist.
exception:
  StandardException - Standard cloudscape exception policy



postRecovery
public void postRecovery() throws StandardException(Code)
Called after recovery is performed.
exception:
  StandardException - Standard Cloudscape Error Policy



reCreateContainerForRedoRecovery
public void reCreateContainerForRedoRecovery(RawTransaction t, long segmentId, long containerId, ByteArray containerInfo) throws StandardException(Code)
re-Create a container during redo recovery. Used if container is found to not exist during redo recovery of log records creating the container.
exception:
  StandardException - Standard Cloudscape Error policy



reclaimSpace
public int reclaimSpace(Serviceable work, ContextManager contextMgr) throws StandardException(Code)
Reclaim space used by this factory. Called by post commit daemon.
exception:
  StandardException - Standard cloudscape exception policy



removeDroppedContainerFileStubs
public void removeDroppedContainerFileStubs(LogInstant redoLWM) throws StandardException(Code)
This function is called after a checkpoint to remove the stub files thar are not required during recovery. Crash recovery uses these files to identify the dropped containers. Stub files(d*.dat) gets creates when a table/index(containers) dropped.
exception:
  StandardException - Standard Cloudscape error policy



removeOldVersionOfContainers
public void removeOldVersionOfContainers(boolean inRecovery) throws StandardException(Code)



removeStubsOK
public void removeStubsOK()(Code)
Tell the data factory it is OK to remove committed deleted containers when the data factory shuts down.



resetCacheStats
public void resetCacheStats(String cacheName)(Code)
Reset the cache statistics for the specified cache



setDatabaseEncrypted
public void setDatabaseEncrypted()(Code)



setRawStoreFactory
public void setRawStoreFactory(RawStoreFactory rsf, boolean create, Properties properties) throws StandardException(Code)
make data factory aware of which raw store factory it belongs to Also need to boot the LogFactory
exception:
  StandardException - cannot boot the log factory



stop
public void stop()(Code)



unfreezePersistentStore
public void unfreezePersistentStore()(Code)
Backup restore - start writing dirty pages or container to disk



writeFinished
public void writeFinished()(Code)
Backup restore - write finished, if this is the last writer, allow the persistent store to proceed.



writeInProgress
public void writeInProgress() throws StandardException(Code)
Backup restore - don't allow the persistent store to be frozen - or if it is already frozen, block. A write is about to commence.
exception:
  StandardException - Standard Cloudscape error policy



w_w___w.___j_a___v___a__2s.___com_ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.