Java Doc for Inode.java in  » EJB-Server-resin-3.1.5 » resin » com » caucho » db » store » 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 » EJB Server resin 3.1.5 » resin » com.caucho.db.store 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.caucho.db.store.Inode

Inode
public class Inode (Code)
Represents the indexes for a BLOB or CLOB. The inode contains 16 long values
 0) length of the saved file
 1-14) direct fragment addresses (to 112k)
 15) pointer to the indirect block
 

Inline storage (120)

If the length of the blob is less than 120, the blob is stored directly in the inode.

mini fragment storage (3840)

If the length of the blob is less than 3840, the blob is stored in mini-fragments of size 256 pointed by the inode's addresses. The maximum wasted space for mini-fragment storage is 255 bytes.

indirect storage

The indirect block (an 8k fragment) itself is divided into sections:
 0-511) single indirect fragment addresses (4M, 2^12)
 512-767) double indirect block addresses (128G, 2^37)
 768-1023) triple indirect fragment addresses (to 1P, 2^50)
 


Field Summary
final public static  intBLOCK_SIZE
    
final public static  intDIRECT_BLOCKS
    
final public static  longDIRECT_MAX
    
final public static  intDOUBLE_INDIRECT_BLOCKS
    
final public static  longDOUBLE_INDIRECT_MAX
    
final public static  longFRAGMENT_MAX
    
final public static  intFRAGMENT_SIZE
    
final public static  intINDIRECT_BLOCKS
    
final public static  intINLINE_BLOB_SIZE
    
final public static  longINLINE_MAX
    
final public static  intINODE_BLOCK_SIZE
    
final public static  intINODE_SIZE
    
final public static  intMINI_FRAG_BLOB_SIZE
    
final public static  intMINI_FRAG_MAX
    
final public static  intMINI_FRAG_SIZE
    
final public static  intSINGLE_INDIRECT_BLOCKS
    
final public static  longSINGLE_INDIRECT_MAX
    
final public static  intTRIPLE_INDIRECT_BLOCKS
    

Constructor Summary
public  Inode()
    
public  Inode(Store store, StoreTransaction xa)
    
public  Inode(Store store)
    

Method Summary
static  voidappend(byte[] inode, int inodeOffset, Store store, StoreTransaction xa, byte[] buffer, int offset, int length)
     Updates the buffer.
static  voidappend(byte[] inode, int inodeOffset, Store store, StoreTransaction xa, char[] buffer, int offset, int length)
     Updates the buffer.
static  voidclear(byte[] inode, int inodeOffset)
     Clears the inode.
 voidcloseOutputStream()
     Closes the output stream.
public  byte[]getBuffer()
     Returns the buffer.
public  longgetLength()
     Returns the length.
public  StoregetStore()
     Returns the backing store.
public  voidinit(Store store, StoreTransaction xa, byte[] buffer, int offset)
    
public  InputStreamopenInputStream()
     Opens a read stream to the inode.
public  OutputStreamopenOutputStream()
     Opens a byte output stream to the inode.
public  ReaderopenReader()
     Opens a char reader to the inode.
public  WriteropenWriter()
     Opens a char writer to the inode.
static  intread(byte[] inode, int inodeOffset, Store store, long fileOffset, byte[] buffer, int bufferOffset, int bufferLength)
     Reads into a buffer.
static  intread(byte[] inode, int inodeOffset, Store store, long fileOffset, char[] buffer, int bufferOffset, int bufferLength)
     Reads into a buffer.
static  longreadBlockAddr(byte[] inode, int inodeOffset, Store store, long fileOffset)
     Returns the fragment id for the given offset.
static  longreadFragmentAddr(byte[] inode, int inodeOffset, Store store, long fileOffset)
     Returns the fragment id for the given offset.
public static  longreadLong(byte[] buffer, int offset)
     Reads the long.
static  longreadMiniFragAddr(byte[] inode, int inodeOffset, Store store, long fileOffset)
     Returns the fragment id for the given offset.
public  voidremove()
    
public static  voidwriteLong(byte[] buffer, int offset, long v)
     Writes the long.
public  voidwriteToStream(OutputStreamWithBuffer os)
     Writes the inode value to a stream.
public  voidwriteToStream(OutputStreamWithBuffer os, long offset, long length)
     Writes the inode value to a stream.
public  voidwriteToWriter(Writer writer)
     Writes the inode value to a stream.

Field Detail
BLOCK_SIZE
final public static int BLOCK_SIZE(Code)



DIRECT_BLOCKS
final public static int DIRECT_BLOCKS(Code)



DIRECT_MAX
final public static long DIRECT_MAX(Code)



DOUBLE_INDIRECT_BLOCKS
final public static int DOUBLE_INDIRECT_BLOCKS(Code)



DOUBLE_INDIRECT_MAX
final public static long DOUBLE_INDIRECT_MAX(Code)



FRAGMENT_MAX
final public static long FRAGMENT_MAX(Code)



FRAGMENT_SIZE
final public static int FRAGMENT_SIZE(Code)



INDIRECT_BLOCKS
final public static int INDIRECT_BLOCKS(Code)



INLINE_BLOB_SIZE
final public static int INLINE_BLOB_SIZE(Code)



INLINE_MAX
final public static long INLINE_MAX(Code)



INODE_BLOCK_SIZE
final public static int INODE_BLOCK_SIZE(Code)



INODE_SIZE
final public static int INODE_SIZE(Code)



MINI_FRAG_BLOB_SIZE
final public static int MINI_FRAG_BLOB_SIZE(Code)



MINI_FRAG_MAX
final public static int MINI_FRAG_MAX(Code)



MINI_FRAG_SIZE
final public static int MINI_FRAG_SIZE(Code)



SINGLE_INDIRECT_BLOCKS
final public static int SINGLE_INDIRECT_BLOCKS(Code)



SINGLE_INDIRECT_MAX
final public static long SINGLE_INDIRECT_MAX(Code)



TRIPLE_INDIRECT_BLOCKS
final public static int TRIPLE_INDIRECT_BLOCKS(Code)




Constructor Detail
Inode
public Inode()(Code)



Inode
public Inode(Store store, StoreTransaction xa)(Code)



Inode
public Inode(Store store)(Code)




Method Detail
append
static void append(byte[] inode, int inodeOffset, Store store, StoreTransaction xa, byte[] buffer, int offset, int length) throws IOException(Code)
Updates the buffer. Called only from the blob classes.



append
static void append(byte[] inode, int inodeOffset, Store store, StoreTransaction xa, char[] buffer, int offset, int length) throws IOException(Code)
Updates the buffer. Called only from the clob classes.



clear
static void clear(byte[] inode, int inodeOffset)(Code)
Clears the inode.



closeOutputStream
void closeOutputStream()(Code)
Closes the output stream.



getBuffer
public byte[] getBuffer()(Code)
Returns the buffer.



getLength
public long getLength()(Code)
Returns the length.



getStore
public Store getStore()(Code)
Returns the backing store.



init
public void init(Store store, StoreTransaction xa, byte[] buffer, int offset)(Code)



openInputStream
public InputStream openInputStream()(Code)
Opens a read stream to the inode.



openOutputStream
public OutputStream openOutputStream()(Code)
Opens a byte output stream to the inode.



openReader
public Reader openReader()(Code)
Opens a char reader to the inode.



openWriter
public Writer openWriter()(Code)
Opens a char writer to the inode.



read
static int read(byte[] inode, int inodeOffset, Store store, long fileOffset, byte[] buffer, int bufferOffset, int bufferLength) throws IOException(Code)
Reads into a buffer.
Parameters:
  inode - the inode buffer
Parameters:
  inodeOffset - the offset of the inode data in the buffer
Parameters:
  store - the owning store
Parameters:
  fileOffset - the offset into the file to read
Parameters:
  buffer - the buffer receiving the data
Parameters:
  bufferOffset - the offset into the receiving buffer
Parameters:
  bufferLength - the maximum number of bytes to read the number of bytes read



read
static int read(byte[] inode, int inodeOffset, Store store, long fileOffset, char[] buffer, int bufferOffset, int bufferLength) throws IOException(Code)
Reads into a buffer.
Parameters:
  inode - the inode buffer
Parameters:
  inodeOffset - the offset of the inode data in the buffer
Parameters:
  store - the owning store
Parameters:
  fileOffset - the offset into the file to read
Parameters:
  buffer - the buffer receiving the data
Parameters:
  bufferOffset - the offset into the receiving buffer
Parameters:
  bufferLength - the maximum number of chars to read the number of characters read



readBlockAddr
static long readBlockAddr(byte[] inode, int inodeOffset, Store store, long fileOffset) throws IOException(Code)
Returns the fragment id for the given offset.



readFragmentAddr
static long readFragmentAddr(byte[] inode, int inodeOffset, Store store, long fileOffset) throws IOException(Code)
Returns the fragment id for the given offset.



readLong
public static long readLong(byte[] buffer, int offset)(Code)
Reads the long.



readMiniFragAddr
static long readMiniFragAddr(byte[] inode, int inodeOffset, Store store, long fileOffset) throws IOException(Code)
Returns the fragment id for the given offset.



remove
public void remove()(Code)
Deletes the inode



writeLong
public static void writeLong(byte[] buffer, int offset, long v)(Code)
Writes the long.



writeToStream
public void writeToStream(OutputStreamWithBuffer os) throws IOException(Code)
Writes the inode value to a stream.



writeToStream
public void writeToStream(OutputStreamWithBuffer os, long offset, long length) throws IOException(Code)
Writes the inode value to a stream.



writeToWriter
public void writeToWriter(Writer writer) throws IOException(Code)
Writes the inode value to a stream.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.