418
• Code Sample: Create a “Hello World” Program Using Persistent
Collections for Java∗ (PCJ) – https://software.intel.com/en-us/
articles/code-sample-create-a-hello-world-program-usingpersistent-collections-for-java-pcj
Low-Level Persistent Library (LLPL)
The Low-Level Persistence Library (LLPL) is an open source Java library being
developed by Intel for persistent memory programming. By providing Java access to
persistent memory at a memory block level, LLPL gives developers a foundation for
building custom abstractions or retrofitting existing code. More information on LLPL,
including source code, sample code, and javadocs, is available on GitHub at https://
github.com/pmem/llpl.
The library offers management of heaps of persistent memory and manual allocation
and deallocation of blocks of persistent memory within a heap. A Java persistent memory
block class provides methods to read and write Java integer types within a block as well
as copy bytes from block to block and between blocks and (volatile) Java byte arrays.
Several different kinds of heaps and corresponding memory blocks are available
to aid in implementing different data consistency schemes. Examples of such
implementable schemes:
• Transactional: Data in memory is usable after a crash or power failure
• Persistent: Data in memory is usable after a controlled process exit
• Volatile: Persistent memory used for its large capacity, data is not
needed after exit.
Mixed data consistency schemes are also implementable. For example, transactional
writes for critical data and either persistent or volatile writes for less critical data (e.g.,
statistics or caches).
LLPL uses the libpmemobj library from the Persistent Memory Development Kit (PMDK)
which we discussed in Chapter 7. For additional information on PMDK, please visit
https://pmem.io/ and https://github.com/pmem/pmdk.
Appendix d JAvA for persistent MeMory
Précédent

- 438/457

Suivant