Skip to content

Commit cb59960

Browse files
author
mappedbus
committed
Merge branch 'master' of https://github.com/caplogic/mappedbus
2 parents aaf8ed4 + f3f31c6 commit cb59960

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,15 @@ The project contains examples of an object based and a byte array based reader/w
7878
The object based one work as follows. The ObjectWriter class will send a message, PriceUpdate, which contains three fields: source, price and quantity. The first argument of the ObjectWriter is used to populate the source. The ObjectReader simply prints every message it receives.
7979

8080
```
81-
> java -cp mappedbus.jar se.caplogic.mappedbus.sample.object.ObjectWriter 0
81+
> java -cp mappedbus.jar io.mappedbus.sample.object.ObjectWriter 0
8282
...
8383
```
8484
```
85-
> java -cp mappedbus.jar se.caplogic.mappedbus.sample.object.ObjectWriter 1
85+
> java -cp mappedbus.jar io.mappedbus.sample.object.ObjectWriter 1
8686
...
8787
```
8888
```
89-
> java -cp mappedbus.jar se.caplogic.mappedbus.sample.object.ObjectReader
89+
> java -cp mappedbus.jar io.mappedbus.sample.object.ObjectReader
9090
...
9191
Read: PriceUpdate [source=0, price=20, quantity=40]
9292
Read: PriceUpdate [source=1, price=8, quantity=16]
@@ -97,19 +97,19 @@ The byte array based example is run in the same way.
9797

9898
Another example simulates a token passed around between a number of nodes. Each node will send a message, Token, which contains two fields: to and from. When a node receives a token it will check whether it's the receiver and if so it will send a new token message with the "to" field set to it's id + 1 mod "number of nodes".
9999
```
100-
> java -cp mappedbus.jar se.caplogic.mappedbus.sample.token.Token 0 3
100+
> java -cp mappedbus.jar io.mappedbus.sample.token.Token 0 3
101101
Read: Token [from=0, to=1]
102102
Read: Token [from=1, to=2]
103103
...
104104
```
105105
```
106-
> java -cp mappedbus.jar se.caplogic.mappedbus.sample.token.Token 1 3
106+
> java -cp mappedbus.jar io.mappedbus.sample.token.Token 1 3
107107
Read: Token [from=0, to=1]
108108
Read: Token [from=1, to=2]
109109
...
110110
```
111111
```
112-
> java -cp mappedbus.jar se.caplogic.mappedbus.sample.token.Token 2 3
112+
> java -cp mappedbus.jar io.mappedbus.sample.token.Token 2 3
113113
Read: Token [from=0, to=1]
114114
Read: Token [from=1, to=2]
115115
...
@@ -120,11 +120,11 @@ Read: Token [from=1, to=2]
120120

121121
The project contains a performance test which can be run as follows:
122122
```
123-
> java -cp mappedbus.jar se.caplogic.mappedbus.perf.MessageWriter /home/youraccount/tmp/test
123+
> java -cp mappedbus.jar io.mappedbus.perf.MessageWriter /home/youraccount/tmp/test
124124
...
125125
```
126126
```
127-
> java -cp mappedbus.jar se.caplogic.mappedbus.perf.MessageReader /home/youraccount/tmp/test
127+
> java -cp mappedbus.jar io.mappedbus.perf.MessageReader /home/youraccount/tmp/test
128128
Elapsed: 1801 ms
129129
Per op: 22 ns
130130
Op/s: 44404868

0 commit comments

Comments
 (0)