Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Johannes Lichtenberger committed Feb 9, 2019
1 parent e068266 commit 76a2f64
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Expand Up @@ -385,13 +385,13 @@ Databases.createXdmDatabase(config);
// Open the database.
try (var database = Databases.openXdmDatabase(file)) {
/*
* Create a resource in the database with the name "resource1".
* Create a resource in the database with the name "resource".
* Store deweyIDs (hierarchical node labels), use text node compression,
* build a summary of all paths in the resource and use the SLIDING_SNAPSHOT
* versioning algorithm.
*/
database.createResource(
ResourceConfiguration.newBuilder("resource1", config)
ResourceConfiguration.newBuilder("resource")
.useDeweyIDs(true)
.useTextCompression(true)
.buildPathSummary(true)
Expand Down Expand Up @@ -428,7 +428,7 @@ try (var database = Databases.openXdmDatabase(file)) {

// Serialize the revision back to XML.
final OutputStream out = new ByteArrayOutputStream();
new XMLSerializer.XMLSerializerBuilder(manager, out).prettyPrint().build().call();
new XmlSerializer.XmlSerializerBuilder(manager, out).prettyPrint().build().call();

System.out.println(out);
}
Expand All @@ -442,25 +442,25 @@ There are N reading transactions as well as one write-transaction permitted on a
A read-only transaction can be opened through:

```java
var rtx = manager.beginNodeReadTrx()
var rtx = manager.beginNodeReadOnlyTrx()
```

The codè above starts a transaction on the most recent revision.

The following code starts a transaction at revision 1.

```java
var rtx = manager.beginNodeReadTrx(1)
var rtx = manager.beginNodeReadOnlyTrx(1)
```

The next read only transaction is going to be stared on the revision, which has been committed at the closest timestamp to the given point in time.

```java
var time = LocalDateTime.of(2018, Month.APRIL, 28, 23, 30);
var rtx = manager.beginNodeReadTrx(time.toInstant())
var rtx = manager.beginNodeReadOnlyTrx(time.toInstant())
```

There are also several ways to start the single write-transaction:
There are also several ways to start the single read/write-transaction:

```java
 /**
Expand Down

0 comments on commit 76a2f64

Please sign in to comment.