454
455 static {
456 initialize();
457 }
458 private static native void initialize();
459
460 /**
461 * Initialize archived static fields in the given Class using archived
462 * values from CDS dump time. Also initialize the classes of objects in
463 * the archived graph referenced by those fields.
464 *
465 * Those static fields remain as uninitialized if there is no mapped CDS
466 * java heap data or there is any error during initialization of the
467 * object class in the archived graph.
468 */
469 public static native void initializeFromArchive(Class<?> c);
470
471 public static native long getRandomSeedForCDSDump();
472
473 /**
474 * Provides access to information on buffer usage.
475 */
476 public interface BufferPool {
477 String getName();
478 long getCount();
479 long getTotalCapacity();
480 long getMemoryUsed();
481 }
482
483 private static class BufferPoolsHolder {
484 static final List<BufferPool> BUFFER_POOLS;
485
486 static {
487 ArrayList<BufferPool> bufferPools = new ArrayList<>(3);
488 bufferPools.add(SharedSecrets.getJavaNioAccess().getDirectBufferPool());
489 bufferPools.add(FileChannelImpl.getMappedBufferPool());
490 bufferPools.add(FileChannelImpl.getSyncMappedBufferPool());
491
492 BUFFER_POOLS = Collections.unmodifiableList(bufferPools);
493 }
|
454
455 static {
456 initialize();
457 }
458 private static native void initialize();
459
460 /**
461 * Initialize archived static fields in the given Class using archived
462 * values from CDS dump time. Also initialize the classes of objects in
463 * the archived graph referenced by those fields.
464 *
465 * Those static fields remain as uninitialized if there is no mapped CDS
466 * java heap data or there is any error during initialization of the
467 * object class in the archived graph.
468 */
469 public static native void initializeFromArchive(Class<?> c);
470
471 public static native long getRandomSeedForCDSDump();
472
473 /**
474 * Check if CDS dynamic dumping is enabled via the DynamicDumpSharedSpaces flag.
475 */
476 public static native boolean isCDSDumpingEnabled();
477
478 /**
479 * Check if CDS sharing is enabled by via the UseSharedSpaces flag.
480 */
481 public static native boolean isCDSSharingEnabled();
482
483 /**
484 * Provides access to information on buffer usage.
485 */
486 public interface BufferPool {
487 String getName();
488 long getCount();
489 long getTotalCapacity();
490 long getMemoryUsed();
491 }
492
493 private static class BufferPoolsHolder {
494 static final List<BufferPool> BUFFER_POOLS;
495
496 static {
497 ArrayList<BufferPool> bufferPools = new ArrayList<>(3);
498 bufferPools.add(SharedSecrets.getJavaNioAccess().getDirectBufferPool());
499 bufferPools.add(FileChannelImpl.getMappedBufferPool());
500 bufferPools.add(FileChannelImpl.getSyncMappedBufferPool());
501
502 BUFFER_POOLS = Collections.unmodifiableList(bufferPools);
503 }
|