Exposed read/write buffers for kryo. Reading objects can return null
This commit is contained in:
parent
a3bacf7b89
commit
0195ef3dc8
@ -26,8 +26,8 @@ import org.agrona.DirectBuffer
|
|||||||
*/
|
*/
|
||||||
class KryoExtra<CONNECTION: Connection>() : Kryo() {
|
class KryoExtra<CONNECTION: Connection>() : Kryo() {
|
||||||
// for kryo serialization
|
// for kryo serialization
|
||||||
private val readerBuffer = AeronInput()
|
internal val readerBuffer = AeronInput()
|
||||||
private val writerBuffer = AeronOutput()
|
internal val writerBuffer = AeronOutput()
|
||||||
|
|
||||||
// crypto + compression have to work with native byte arrays, so here we go...
|
// crypto + compression have to work with native byte arrays, so here we go...
|
||||||
// private val reader = Input(ABSOLUTE_MAX_SIZE_OBJECT)
|
// private val reader = Input(ABSOLUTE_MAX_SIZE_OBJECT)
|
||||||
@ -133,7 +133,7 @@ class KryoExtra<CONNECTION: Connection>() : Kryo() {
|
|||||||
* ++++++++++++++++++++++++++
|
* ++++++++++++++++++++++++++
|
||||||
*/
|
*/
|
||||||
@Throws(Exception::class)
|
@Throws(Exception::class)
|
||||||
fun read(buffer: DirectBuffer, offset: Int, length: Int, connection: CONNECTION): Any {
|
fun read(buffer: DirectBuffer, offset: Int, length: Int, connection: CONNECTION): Any? {
|
||||||
// required by RMI and some serializers to determine which connection wrote (or has info about) this object
|
// required by RMI and some serializers to determine which connection wrote (or has info about) this object
|
||||||
this.connection = connection
|
this.connection = connection
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user