|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectccs.beetree.BeeTreeCompactor
public class BeeTreeCompactor
Handles the problem of compacting a BeeTree. This involves:
The compaction must not be thread-locked, or it will abort. The compaction looks after its own locking.
| Constructor Summary | |
|---|---|
BeeTreeCompactor(BeeTree bt,
boolean isPWChange,
byte[] newpw,
BeeTreeObserver bto,
int wipeMode)
Construct a BeeTreeCompactor. |
|
BeeTreeCompactor(BeeTree bt,
boolean isPWChange,
byte[] newpw,
BeeTreeObserver bto,
int wipeMode,
BeeTreeFilter btf)
Construct a BeeTreeCompactor. |
|
| Method Summary | |
|---|---|
void |
run()
Perform the compaction procedure. |
void |
setIntervalMillis(int intervalMillis)
Set the approximate minimum interval between status reports to the BeeTreeObserver during the object-transfer (main) phase of the compaction. |
void |
setStrip(boolean isStrip)
Set whether to strip unprintable characters from keys before sending status reports to any BeeTreeObserver. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BeeTreeCompactor(BeeTree bt,
boolean isPWChange,
byte[] newpw,
BeeTreeObserver bto,
int wipeMode)
throws java.io.IOException
bt - The BeeTree to compact.isPWChange - Whether the password is to be changed.newpw - The passphrase bytes to change to. If null, the database becomes
plaintext. Ignored unless isPWChange is true.bto - If non-null, receives regular progress reports as the
procedure progresses.wipeMode - A value from ccs.utils.FileKiller describing
what to do with the old (uncompacted) copy of the database.
java.io.IOException - if a temporary file could not be created.
public BeeTreeCompactor(BeeTree bt,
boolean isPWChange,
byte[] newpw,
BeeTreeObserver bto,
int wipeMode,
BeeTreeFilter btf)
throws java.io.IOException
bt - The BeeTree to compact. The necessary swap file will be created
in the same directory.isPWChange - Whether the password is to be changed.newpw - The passphrase bytes to change to. If null, the database becomes
plaintext. Ignored unless isPWChange is true.bto - If non-null, receives regular progress reports as the
procedure progresses.wipeMode - A value from ccs.utils.FileKiller describing
what to do with the old (uncompacted) copy of the database.btf - If non-null, allows the beetree contents to be filtered.
java.io.IOException - if a temporary file could not be created.| Method Detail |
|---|
public void setStrip(boolean isStrip)
BeeTreeObserver. Default true.
public void setIntervalMillis(int intervalMillis)
public void run()
throws java.io.IOException
BeeException - if a minor problem occurred.
ConsistencyException - if a severe problem occurred.
java.io.IOException - if an I/O failure occurred.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||