Skip to content

Issue 149: Implement off-heap cache storage - #151

Merged
caliuf merged 7 commits into
diennea:masterfrom
eolivelli:fix/offheap-storage
Jan 9, 2019
Merged

caliuf merged 7 commits into
diennea:masterfrom
eolivelli:fix/offheap-storage

Conversation

@eolivelli

Copy link
Copy Markdown
Contributor

Use Netty Direct ByteBufs to store data.
Introduce refcounting of CacheEntry objects in order to be able to release direct memory

@eolivelli eolivelli closed this Dec 31, 2018
@eolivelli eolivelli reopened this Dec 31, 2018
@eolivelli

Copy link
Copy Markdown
Contributor Author

I am not really sure that using ByteBufInputStream can be faster that deserializing to a byte[] and then reading data from a ByteArrayInputStream, because ByteBufInputStream will perform a lot of Unsafe operations instead of a single copy from Direct to Heap, only benchmarks will give the answer

@eolivelli

Copy link
Copy Markdown
Contributor Author

Fixes #149

import java.util.logging.Logger;

/**
* Una entry nella cache

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment in italian. Not important

@caliuf caliuf left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 it looks ok

@caliuf
caliuf merged commit cc8ed6b into diennea:master Jan 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants