Java Doc for MemoryStore.java in  » RSS-RDF » sesame » org » openrdf » sail » memory » 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 » RSS RDF » sesame » org.openrdf.sail.memory 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.openrdf.sail.helpers.SailBase
      org.openrdf.sail.memory.MemoryStore

MemoryStore
public class MemoryStore extends SailBase (Code)
An implementation of the Sail interface that stores its data in main memory and that can use a file for persistent storage. This Sail implementation supports single, isolated transactions. This means that changes to the data are not visible until a transaction is committed and that concurrent transactions are not possible. When another transaction is active, calls to startTransaction() will block until the active transaction is committed or rolled back.
author:
   Arjohn Kampman
author:
   jeen


Field Summary
final protected static  StringDATA_FILE_NAME
    

Constructor Summary
public  MemoryStore()
     Creates a new MemoryStore.
public  MemoryStore(File dataDir)
     Creates a new persistent MemoryStore.

Method Summary
protected  StatementaddStatement(Resource subj, URI pred, Value obj, Resource context, boolean explicit)
    
protected  voidcancelSyncTask()
    
protected  voidcancelSyncTimer()
    
protected  voidcleanSnapshots()
     Removes statements from old snapshots from the main statement list and resets the snapshot to 1 for the rest of the statements.
protected  voidcommit()
    
protected  CloseableIteration<MemStatement, X>createStatementIterator(Class<X> excClass, Resource subj, URI pred, Value obj, boolean explicitOnly, int snapshot, ReadMode readMode, Resource... contexts)
     Creates a StatementIterator that contains the statements matching the specified pattern of subject, predicate, object, context.
protected  SailConnectiongetConnectionInternal()
    
protected  intgetCurrentSnapshot()
    
protected  MemNamespaceStoregetNamespaceStore()
    
public  booleangetPersist()
    
protected  MemStatementListgetStatements()
    
protected  LockgetStatementsReadLock()
    
public  longgetSyncDelay()
     Gets the currently configured sync delay.
protected  LockgetTransactionLock()
    
public  MemValueFactorygetValueFactory()
    
public  voidinitialize()
     Initializes this repository.
final protected  booleanisInitialized()
     Checks whether the Sail has been initialized.
public  booleanisWritable()
     Checks whether this Sail object is writable.
protected  booleanremoveStatement(MemStatement st, boolean explicit)
    
protected  voidrollback()
    
protected  voidscheduleSnapshotCleanup()
    
protected  voidscheduleSyncTask()
    
public  voidsetDataDir(File dataDir)
    
public  voidsetPersist(boolean persist)
    
public  voidsetSyncDelay(long syncDelay)
     Sets the time (in milliseconds) to wait after a transaction was commited before writing the changed data to file.
protected  voidshutDownInternal()
    
protected  intsize()
    
protected  voidstartTransaction()
    
public  voidsync()
     Synchronizes the contents of this repository with the data that is stored on disk.

Field Detail
DATA_FILE_NAME
final protected static String DATA_FILE_NAME(Code)




Constructor Detail
MemoryStore
public MemoryStore()(Code)
Creates a new MemoryStore.



MemoryStore
public MemoryStore(File dataDir)(Code)
Creates a new persistent MemoryStore. If the specified data directory contains an existing store, its contents will be restored upon initialization.
Parameters:
  dataDir - the data directory to be used for persistence.




Method Detail
addStatement
protected Statement addStatement(Resource subj, URI pred, Value obj, Resource context, boolean explicit) throws SailException(Code)



cancelSyncTask
protected void cancelSyncTask()(Code)



cancelSyncTimer
protected void cancelSyncTimer()(Code)



cleanSnapshots
protected void cleanSnapshots() throws InterruptedException(Code)
Removes statements from old snapshots from the main statement list and resets the snapshot to 1 for the rest of the statements.
throws:
  InterruptedException -



commit
protected void commit() throws SailException(Code)



createStatementIterator
protected CloseableIteration<MemStatement, X> createStatementIterator(Class<X> excClass, Resource subj, URI pred, Value obj, boolean explicitOnly, int snapshot, ReadMode readMode, Resource... contexts)(Code)
Creates a StatementIterator that contains the statements matching the specified pattern of subject, predicate, object, context. Inferred statements are excluded when explicitOnly is set to true. Statements from the null context are excluded when namedContextsOnly is set to true. The returned StatementIterator will assume the specified read mode.



getConnectionInternal
protected SailConnection getConnectionInternal() throws SailException(Code)



getCurrentSnapshot
protected int getCurrentSnapshot()(Code)



getNamespaceStore
protected MemNamespaceStore getNamespaceStore()(Code)



getPersist
public boolean getPersist()(Code)



getStatements
protected MemStatementList getStatements()(Code)



getStatementsReadLock
protected Lock getStatementsReadLock() throws SailException(Code)



getSyncDelay
public long getSyncDelay()(Code)
Gets the currently configured sync delay. syncDelay The sync delay in milliseconds.
See Also:   MemoryStore.setSyncDelay



getTransactionLock
protected Lock getTransactionLock() throws SailException(Code)



getValueFactory
public MemValueFactory getValueFactory()(Code)



initialize
public void initialize() throws SailException(Code)
Initializes this repository. If a persistence file is defined for the store, the contents will be restored.
throws:
  SailException - when initialization of the store failed.



isInitialized
final protected boolean isInitialized()(Code)
Checks whether the Sail has been initialized. true if the Sail has been initialized, falseotherwise.



isWritable
public boolean isWritable()(Code)
Checks whether this Sail object is writable. A MemoryStore is not writable if a read-only data file is used.



removeStatement
protected boolean removeStatement(MemStatement st, boolean explicit) throws SailException(Code)



rollback
protected void rollback() throws SailException(Code)



scheduleSnapshotCleanup
protected void scheduleSnapshotCleanup()(Code)



scheduleSyncTask
protected void scheduleSyncTask() throws SailException(Code)



setDataDir
public void setDataDir(File dataDir)(Code)



setPersist
public void setPersist(boolean persist)(Code)



setSyncDelay
public void setSyncDelay(long syncDelay)(Code)
Sets the time (in milliseconds) to wait after a transaction was commited before writing the changed data to file. Setting this variable to 0 will force a file sync immediately after each commit. A negative value will deactivate file synchronization until the Sail is shut down. A positive value will postpone the synchronization for at least that amount of milliseconds. If in the meantime a new transaction is started, the file synchronization will be rescheduled to wait for another syncDelay ms. This way, bursts of transaction events can be combined in one file sync.

The default value for this parameter is 0 (immediate synchronization).
Parameters:
  syncDelay - The sync delay in milliseconds.




shutDownInternal
protected void shutDownInternal() throws SailException(Code)



size
protected int size()(Code)



startTransaction
protected void startTransaction() throws SailException(Code)



sync
public void sync() throws SailException(Code)
Synchronizes the contents of this repository with the data that is stored on disk. Data will only be written when the contents of the repository and data in the file are out of sync.



Fields inherited from org.openrdf.sail.helpers.SailBase
final protected static long DEFAULT_CONNECTION_TIMEOUT(Code)(Java Doc)
protected long connectionTimeOut(Code)(Java Doc)
final protected Logger logger(Code)(Java Doc)

Methods inherited from org.openrdf.sail.helpers.SailBase
public void addSailChangedListener(SailChangedListener listener)(Code)(Java Doc)
protected void connectionClosed(SailConnection connection)(Code)(Java Doc)
public SailConnection getConnection() throws SailException(Code)(Java Doc)
abstract protected SailConnection getConnectionInternal() throws SailException(Code)(Java Doc)
public File getDataDir()(Code)(Java Doc)
public void notifySailChanged(SailChangedEvent event)(Code)(Java Doc)
public void removeSailChangedListener(SailChangedListener listener)(Code)(Java Doc)
public void setDataDir(File dataDir)(Code)(Java Doc)
public void shutDown() throws SailException(Code)(Java Doc)
abstract protected void shutDownInternal() throws SailException(Code)(Java Doc)

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.