![JAR search and dependency download from the Maven repository](/logo.png)
com.yahoo.memory.Map Maven / Gradle / Ivy
/*
* Copyright 2017, Yahoo! Inc. Licensed under the terms of the
* Apache License 2.0. See LICENSE file at the project root for terms.
*/
package com.yahoo.memory;
/**
* Read only interface for a memory mapped file
*
* @author Roman Leventov
* @author Lee Rhodes
* @author Praveenkumar Venkatesan
*/
interface Map extends AutoCloseable {
/**
* Loads content into physical memory. This method makes a best effort to ensure that, when it
* returns, this buffer's content is resident in physical memory. Invoking this method may cause
* some number of page faults and I/O operations to occur.
*
* @see
* java/nio/MappedByteBuffer.load
*/
void load();
/**
* Tells whether or not the content is resident in physical memory. A return value of true implies
* that it is highly likely that all of the data in this buffer is resident in physical memory and
* may therefore be accessed without incurring any virtual-memory page faults or I/O operations. A
* return value of false does not necessarily imply that the content is not resident in physical
* memory. The returned value is a hint, rather than a guarantee, because the underlying operating
* system may have paged out some of the buffer's data by the time that an invocation of this
* method returns.
*
* @return true if loaded
*
* @see java
* /nio/MappedByteBuffer.isLoaded
*/
boolean isLoaded();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy