On 25/08/16 16:16, Laurent Rucquoy wrote:
Hello,

I'm implementing a TDB-backed dataset (Jena 3.1) and I whish to provide a
method to change the StoreParams of this dataset.
> > Because changing the StoreParams implies to release the corresponding
dataset location, I'd like to identify the current StoreParams in use to be
able to avoid to release the location if the StoreParams we want to apply
now are the same as those currently used.

Release is not so bad unless you are doing it frequently.


What is the right way to do this (if possible) ?

This may work:

DatasetGraphTDB x = TDBInternal.getBaseDatasetGraphTDB(myDatasetGraph)
StoreParams sp = x.getConfig().params ;
System.out.println(sp);

(the "may" is because I only think it works on a live dataset no tested it)

Obviously the name "TDBInternal" is a warning!

Which params are you interested in changing?

    Andy

Defaults:

fileMode               dft:mapped
blockSize              dft:8192
readCacheSize          dft:10000
writeCacheSize         dft:2000
Node2NodeIdCacheSize   dft:100000
NodeId2NodeCacheSize   dft:500000
NodeMissCacheSize      dft:100
indexNode2Id           dft:node2id
indexId2Node           dft:nodes
primaryIndexTriples    dft:SPO
tripleIndexes          dft:[SPO, POS, OSP]
primaryIndexQuads      dft:GSPO
quadIndexes            dft:[GSPO, GPOS, GOSP, POSG, OSPG, SPOG]
primaryIndexPrefix     dft:GPU
prefixIndexes          dft:[GPU]
indexPrefix            dft:prefixIdx
prefixNode2Id          dft:prefix2id
prefixId2Node          dft:prefixes


Thank you in advance for your help.

Sincerely,
Laurent


Reply via email to