Package com.mckoi.store
Class AbstractStore.StoreMutableArea
- java.lang.Object
-
- com.mckoi.store.AbstractStore.StoreArea
-
- com.mckoi.store.AbstractStore.StoreMutableArea
-
- All Implemented Interfaces:
Area
,MutableArea
- Direct Known Subclasses:
AbstractStore.StoreAreaWriter
- Enclosing class:
- AbstractStore
private class AbstractStore.StoreMutableArea extends AbstractStore.StoreArea implements MutableArea
-
-
Field Summary
-
Fields inherited from class com.mckoi.store.AbstractStore.StoreArea
buffer, BUFFER_SIZE, end_pointer, id, position, start_pointer
-
-
Constructor Summary
Constructors Constructor Description StoreMutableArea(long id, long pointer)
StoreMutableArea(long id, long pointer, long fixed_size)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkOut()
Checks out all changes made to this area.void
put(byte b)
void
put(byte[] buf)
void
put(byte[] buf, int off, int len)
void
putChar(char c)
void
putInt(int i)
void
putLong(long l)
void
putShort(short s)
java.lang.String
toString()
-
Methods inherited from class com.mckoi.store.AbstractStore.StoreArea
capacity, checkPositionBounds, copyTo, get, get, getChar, getID, getInt, getLong, getShort, position, position
-
-
-
-
Method Detail
-
checkOut
public void checkOut() throws java.io.IOException
Description copied from interface:MutableArea
Checks out all changes made to this area. This should be called after a series of updates have been made to the area and the final change is to be 'finalized'. When this method returns, any new Area or MutableArea objects created by the backing store will contain the changes made to this object. Any changes made to the Area may or may not be made to any already existing areas.In a logging implementation, this may flush out the changes made to the area in a log.
- Specified by:
checkOut
in interfaceMutableArea
- Throws:
java.io.IOException
-
put
public void put(byte b) throws java.io.IOException
- Specified by:
put
in interfaceMutableArea
- Throws:
java.io.IOException
-
put
public void put(byte[] buf, int off, int len) throws java.io.IOException
- Specified by:
put
in interfaceMutableArea
- Throws:
java.io.IOException
-
put
public void put(byte[] buf) throws java.io.IOException
- Specified by:
put
in interfaceMutableArea
- Throws:
java.io.IOException
-
putShort
public void putShort(short s) throws java.io.IOException
- Specified by:
putShort
in interfaceMutableArea
- Throws:
java.io.IOException
-
putInt
public void putInt(int i) throws java.io.IOException
- Specified by:
putInt
in interfaceMutableArea
- Throws:
java.io.IOException
-
putLong
public void putLong(long l) throws java.io.IOException
- Specified by:
putLong
in interfaceMutableArea
- Throws:
java.io.IOException
-
putChar
public void putChar(char c) throws java.io.IOException
- Specified by:
putChar
in interfaceMutableArea
- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
- Overrides:
toString
in classAbstractStore.StoreArea
-
-