@NotStorableClass public class StoreGarbager extends Object implements Runnable
Store
Constructor and Description |
---|
StoreGarbager(IStoreForGarbage store) |
Modifier and Type | Method and Description |
---|---|
void |
disableBackgroundGarbageSweep()
disable background garbage sweep operation
|
void |
enableBackgroundGarbageSweep(int sleepTime)
enable background garbage sweep operation
|
int |
garbageSweep(String filePath)
garbage sweep, remove data record for object not attached to root
|
ReferenceLink[] |
getAllReferenceLink() |
List<DataRecordIdentifierRBTNode> |
getCandidate() |
int |
getNumberOfGarbageCandidate() |
int |
getNumberOfToGarbage() |
List<DataRecordIdentifierRBTNode> |
getToGarbage() |
boolean |
isWorking()
to know if sweeping or waiting ( may be because it is disabled )
|
void |
run() |
void |
setGarbageListener(IGarbageListener listener) |
void |
setStoreSaver(IStoreSaverForGarbage storeSaver) |
void |
start() |
void |
stop() |
void |
usedForGarbageManagement(Set<DataRecordIdentifier> setToUpdate) |
public StoreGarbager(IStoreForGarbage store) throws StoreException
StoreException
public void setStoreSaver(IStoreSaverForGarbage storeSaver)
public void setGarbageListener(IGarbageListener listener)
public int getNumberOfToGarbage() throws StoreException
StoreException
@Fortest public List<DataRecordIdentifierRBTNode> getToGarbage() throws StoreException
StoreException
public int getNumberOfGarbageCandidate() throws StoreException
StoreException
@Fortest public List<DataRecordIdentifierRBTNode> getCandidate() throws StoreException
StoreException
@Fortest public ReferenceLink[] getAllReferenceLink() throws StoreException
StoreException
public int garbageSweep(String filePath) throws StoreException, StoreClassNotFoundException, StoreDataCorruptedException
filePath
- temporary file for data record identifier setStoreException
StoreClassNotFoundException
StoreDataCorruptedException
public void enableBackgroundGarbageSweep(int sleepTime)
sleepTime
- sleep time between garbage sweep operationpublic void disableBackgroundGarbageSweep() throws StoreException
StoreException
public void start() throws StoreException
StoreException
public void stop() throws StoreException
StoreException
public boolean isWorking()
public void usedForGarbageManagement(Set<DataRecordIdentifier> setToUpdate) throws StoreException
StoreException
Copyright © 2007-2012 Luc Peuvrier. All Rights Reserved.