@NotStorableClass public class GarbageManager extends Object implements IGarbageManagerForLinkUpdate, IGarbageManagerForCollect
Constructor and Description |
---|
GarbageManager(HeapRecordableManager heapRecordableManager,
HelperBinaryConversion helperBinaryConversion,
IHeapDataManager dataManager,
IObjectIoManagerForGarbage objectIOManager,
ToVisitRecordManager toVisitRecordManager,
VisitedRecordManager visitedRecordManager,
StoreHeader storeHeader,
JoafipMutex storeMutex) |
Modifier and Type | Method and Description |
---|---|
boolean |
addCandidate(DataRecordIdentifier dataRecordIdentifier)
add a garbage candidate
called by save manager when it discover a garbage candidate |
void |
addToGarbage(DataRecordIdentifier dataRecordIdentifier)
add "to garbage"
called by save manager when it discover a data record to garbage the added is removed from candidate if exist in candidate set |
boolean |
garbagePass()
perform a garbage pass
|
ReferenceLink[] |
getAllReferenceLink() |
List<DataRecordIdentifierRBTNode> |
getCandidate() |
void |
getCandidateRecordAllDataRecordIdentifiers(Set<DataRecordIdentifier> setToUpdate) |
GarbageCandidateRecordManager |
getGarbageCandidateRecordManager() |
void |
getLinkRecordAllDataRecordIdentifiers(Set<DataRecordIdentifier> setToUpdate) |
LinkRecordManager |
getLinkRecordManager() |
int |
getNumberOfGarbageCandidate()
get number of garbage candidate in the list
|
int |
getNumberOfToGarbage()
get number of to garbage in the list
|
List<DataRecordIdentifierRBTNode> |
getToGarbage() |
void |
getToGarbageRecordAllDataRecordIdentifiers(Set<DataRecordIdentifier> setToUpdate) |
ToGarbageRecordManager |
getToGarbageRecordManager() |
boolean |
isOneGarbaged() |
boolean |
removeFromCandidate(DataRecordIdentifier dataRecordIdentifier)
remove a garbage candidate
called when load object attached to root |
boolean |
removeFromCandidateAndOrFromToGarbage(DataRecordIdentifier dataRecordIdentifier)
remove a garbage candidate and/or "to garbage"
called by save manager when it discover that object can not be a garbage candidate Also remove from "to garbage" because of object detachment and then re-attachment |
public GarbageManager(HeapRecordableManager heapRecordableManager, HelperBinaryConversion helperBinaryConversion, IHeapDataManager dataManager, IObjectIoManagerForGarbage objectIOManager, ToVisitRecordManager toVisitRecordManager, VisitedRecordManager visitedRecordManager, StoreHeader storeHeader, JoafipMutex storeMutex)
garbageCandidateRecordManager
- toGarbageRecordManager
- linkRecordManager
- dataManager
- toVisitRBTNodeManager
- visitedRBTNodeManager
- storeHeader
- objectIOManager
- public boolean addCandidate(DataRecordIdentifier dataRecordIdentifier) throws GarbageException
IGarbageManagerForLinkUpdate
addCandidate
in interface IGarbageManagerForLinkUpdate
GarbageException
public boolean removeFromCandidate(DataRecordIdentifier dataRecordIdentifier) throws GarbageException
IGarbageManagerForLinkUpdate
removeFromCandidate
in interface IGarbageManagerForLinkUpdate
GarbageException
public boolean removeFromCandidateAndOrFromToGarbage(DataRecordIdentifier dataRecordIdentifier) throws GarbageException
IGarbageManagerForLinkUpdate
removeFromCandidateAndOrFromToGarbage
in interface IGarbageManagerForCollect
removeFromCandidateAndOrFromToGarbage
in interface IGarbageManagerForLinkUpdate
GarbageException
public void addToGarbage(DataRecordIdentifier dataRecordIdentifier) throws GarbageException
IGarbageManagerForLinkUpdate
addToGarbage
in interface IGarbageManagerForLinkUpdate
GarbageException
public int getNumberOfToGarbage() throws GarbageException
IGarbageManagerForCollect
getNumberOfToGarbage
in interface IGarbageManagerForCollect
GarbageException
@Fortest public List<DataRecordIdentifierRBTNode> getToGarbage() throws GarbageException
getToGarbage
in interface IGarbageManagerForCollect
GarbageException
public int getNumberOfGarbageCandidate() throws GarbageException
IGarbageManagerForCollect
getNumberOfGarbageCandidate
in interface IGarbageManagerForCollect
GarbageException
@Fortest public List<DataRecordIdentifierRBTNode> getCandidate() throws GarbageException
getCandidate
in interface IGarbageManagerForCollect
GarbageException
@Fortest public ReferenceLink[] getAllReferenceLink() throws GarbageException, ReferenceLinkGarbageException
getAllReferenceLink
in interface IGarbageManagerForCollect
GarbageException
ReferenceLinkGarbageException
public boolean garbagePass() throws GarbageException, ReferenceLinkGarbageException
IGarbageManagerForCollect
garbagePass
in interface IGarbageManagerForCollect
GarbageException
ReferenceLinkGarbageException
public boolean isOneGarbaged()
isOneGarbaged
in interface IGarbageManagerForCollect
public LinkRecordManager getLinkRecordManager()
getLinkRecordManager
in interface IGarbageManagerForLinkUpdate
@Fortest public ToGarbageRecordManager getToGarbageRecordManager()
@Fortest public GarbageCandidateRecordManager getGarbageCandidateRecordManager()
public void getLinkRecordAllDataRecordIdentifiers(Set<DataRecordIdentifier> setToUpdate) throws GarbageException, ReferenceLinkGarbageException
getLinkRecordAllDataRecordIdentifiers
in interface IGarbageManagerForCollect
GarbageException
ReferenceLinkGarbageException
public void getToGarbageRecordAllDataRecordIdentifiers(Set<DataRecordIdentifier> setToUpdate) throws GarbageException
getToGarbageRecordAllDataRecordIdentifiers
in interface IGarbageManagerForCollect
GarbageException
public void getCandidateRecordAllDataRecordIdentifiers(Set<DataRecordIdentifier> setToUpdate) throws GarbageException
getCandidateRecordAllDataRecordIdentifiers
in interface IGarbageManagerForCollect
GarbageException
Copyright © 2007-2012 Luc Peuvrier. All Rights Reserved.