org.egothor.slotter
Class SlotMap
java.lang.Object
org.egothor.slotter.SlotMap
public class SlotMap extends java.lang.Object
This object represents some map of slots (Barrels).
Author:
galambos, Jakub Podhorny
Constructor Summary
SlotMap (java.lang.String filename,
int versionID)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
SlotMap
public SlotMap (java.lang.String filename,
int versionID)
setListenSlotMap
public void setListenSlotMap (ListenSlotMap listener)
open
public static SlotMap open (java.lang.String filename,
int versionID)
throws java.io.IOException
Returns the slotter on the filename (canonical form of the filename will be used). If the versionID
is a positive integer and it differs from the versionID of the slotter available, null value is returned.
It also assigns a new listener.
Throws:
java.io.IOException
See Also: getRootVersionID()
assignNewListener
public void assignNewListener ()
throws java.io.IOException
Throws:
java.io.IOException
getRootVersionID
public int getRootVersionID ()
getUid
public long getUid ()
getFilename
public java.lang.String getFilename ()
addUnderControl
public Slot addUnderControl (int slot)
elements
public Sequence <Barrel > elements ()
get
public Barrel get (int slot)
get
public Barrel get (Slot slot)
destroy
public void destroy (Slot slot)
softDestroy
public void softDestroy (Slot slot)
save
public Slot save (BarrelReader reader)
pullOverBarrel
public Slot pullOverBarrel (BarrelReader reader,
java.lang.String srcLocation)
Pulls over (moves) srcLocation barrel into this databes.
Parameters: reader
- Reader that is being pulled oversrcLocation
- Reader's location that is being pulled over
Returns:
destroySlots
public void destroySlots ()
rollback
public TransactionLog rollback ()
execute
public TransactionLog execute ()
removeDoc
public boolean removeDoc (long gid,
int slot,
long lid)