Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • The file names in the case of FileCacheStore are just signed integers, so the usual and maximum length of file names is 10 or 11. The file names (i.e. integers) are generated by calculating the Java hashcode of the node's UUID string (and shifting it by 22 fixed bit mask). For example, for root node, file -891938816 gets generated, containing the root node children. 

  • Each of the files contain serialized ModeShape nodes. Although the generated files are binary, the data can be read using a tool that understands both BSON and JBoss serialization, or by using ModeShape API itself (It does not seem possible to read these files using existing bson tools, like mongoDB bsondump).

  • The serialization is done by a JBoss serialization library, not JDK's native object serialization machinery. For this reason the generated serialized files look different from an ordinary JDK serialized file. (Please refer to section on node contents for details.)

...

  •  Using a tool can help in reading the contents of the file. For example, for our root node file (-891938816) , a tool could show the root node data as following:

    Code Block
    languagejs
    { "properties" : { "http://www.jcp.org/jcr/1.0" : { "primaryType" : { "$name" : "mode:root" } , "uuid" : "87a0a8c7505d64/" } } ,
     "children" : [ { "key" : "87a0a8c317f1e7jcr:system" , "name" : "jcr:system" } , 
    { "key" : "87a0a8c7505d646988a17a-ad2f-48f6-aef5-e7d411e184d9" , "name" : "chandni" } ] ,
     "childrenInfo" : { "count" : 2 } }
  • The serialization is done by a JBoss serialization library, not JDK's native object serialization machinery. For this reason the generated serialized files look different from an ordinary JDK serialized file. (Please refer to section on node contents for details.)

 

The actual binary file (in this case -891938816) looks something like this when opened up in a text editor:

...