public class ResizablePersistentIntBuffer
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_PERSISTENCE_TIME |
| Constructor and Description |
|---|
ResizablePersistentIntBuffer(java.io.File f,
int size)
Create the buffer.
|
| Modifier and Type | Method and Description |
|---|---|
void |
abort() |
void |
fill(int value)
Should be called during startup to fill in an appropriate default value e.g.
|
void |
forceWrite() |
int |
get(int offset) |
static int |
getPersistenceTime() |
boolean |
isNew() |
void |
put(int offset,
int value) |
void |
put(int offset,
int value,
boolean noWrite) |
void |
replaceAllEntries(int key,
int value) |
void |
resize(int size) |
static void |
setPersistenceTime(int val) |
void |
shutdown() |
int |
size() |
void |
start(Ticker ticker) |
java.lang.String |
toString() |
public static final int DEFAULT_PERSISTENCE_TIME
public ResizablePersistentIntBuffer(java.io.File f,
int size)
throws java.io.IOException
f - The filename.size - The expected size in ints (i.e. multiply by four to get bytes).java.io.IOExceptionpublic static void setPersistenceTime(int val)
public static int getPersistenceTime()
public void fill(int value)
public void start(Ticker ticker)
public int get(int offset)
public void put(int offset,
int value)
throws java.io.IOException
java.io.IOExceptionpublic void put(int offset,
int value,
boolean noWrite)
throws java.io.IOException
java.io.IOExceptionpublic void shutdown()
public void abort()
public void resize(int size)
public void forceWrite()
public boolean isNew()
public java.lang.String toString()
toString in class java.lang.Objectpublic void replaceAllEntries(int key,
int value)
public int size()