Skip to content

Commit

Permalink
feat(java): Chunk by chunk predictive map serialization protocol (#1722)
Browse files Browse the repository at this point in the history
## What does this PR do?

Implement chunk based map serialization in #925. This pr doesn't provide
JIT support, it will be implemented in later PR.

## Related issues

<!--
Is there any related issue? Please attach here.

- #925 

-->


## Does this PR introduce any user-facing change?

<!--
If any user-facing interface changes, please [open an
issue](https://github.com/apache/fury/issues/new/choose) describing the
need to do so and update the document if necessary.
-->

- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?


## Benchmark

<!--
When the PR has an impact on performance (if you don't know whether the
PR will have an impact on performance, you can submit the PR first, and
if it will have impact on performance, the code reviewer will explain
it), be sure to attach a benchmark data here.
-->

---------

Co-authored-by: hening <[email protected]>
Co-authored-by: chaokunyang <[email protected]>
  • Loading branch information
3 people authored Jan 24, 2025
1 parent 45d3001 commit 7fd582a
Show file tree
Hide file tree
Showing 5 changed files with 1,716 additions and 2 deletions.
9 changes: 9 additions & 0 deletions java/fury-core/src/main/java/org/apache/fury/Fury.java
Original file line number Diff line number Diff line change
Expand Up @@ -935,6 +935,15 @@ public Object readNullable(MemoryBuffer buffer) {
}
}

public Object readNullable(MemoryBuffer buffer, ClassInfoHolder classInfoHolder) {
byte headFlag = buffer.readByte();
if (headFlag == Fury.NULL_FLAG) {
return null;
} else {
return readNonRef(buffer, classInfoHolder);
}
}

/** Class should be read already. */
public Object readData(MemoryBuffer buffer, ClassInfo classInfo) {
depth++;
Expand Down
Loading

0 comments on commit 7fd582a

Please sign in to comment.