-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3de0eed
commit 9be3bcd
Showing
6 changed files
with
86 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
package org.rxjournal.impl; | ||
|
||
import net.openhft.chronicle.wire.ValueIn; | ||
|
||
/** | ||
* Created by daniel on 18/05/17. | ||
*/ | ||
public class DataItemProcessor { | ||
|
||
private byte status; | ||
private long messageCount; | ||
private long time; | ||
private String storedFilter; | ||
private Object valueFromQueue; | ||
|
||
public void process(ValueIn in, Object using){ | ||
status = in.int8(); | ||
messageCount = in.int64(); | ||
time = in.int64(); | ||
storedFilter = in.text(); | ||
|
||
if(status == RxStatus.ERROR){ | ||
valueFromQueue = in.throwable(false); | ||
}else { | ||
if(using== null) { | ||
valueFromQueue = in.object(); | ||
}else{ | ||
valueFromQueue = in.object(using, using.getClass()); | ||
} | ||
} | ||
} | ||
|
||
public byte getStatus() { | ||
return status; | ||
} | ||
|
||
public long getMessageCount() { | ||
return messageCount; | ||
} | ||
|
||
public long getTime() { | ||
return time; | ||
} | ||
|
||
public String getFilter() { | ||
return storedFilter; | ||
} | ||
|
||
public Object getObject() { | ||
return valueFromQueue; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters