Package com.jalios.jstore
Class Swizzler
java.lang.Object
com.jalios.jstore.Swizzler
This class manages the id <-> storable maps.
- Author:
- Olivier Dedieu
-
Method Summary
Modifier and TypeMethodDescriptionvoidDecrements the Reference Counter of the storablegetStorable(String id) voidIncrements the Reference Counter of the storablebooleanisReferrenced(Storable storable) booleanisSwizzled(Storable storable) Check if the specified Storable (or any storable with matching id) has been saved in SwizzlerbooleanisSwizzled(String id) iterator()Return an iterator on the storable setvoidregisterStorable(Storable storable, Map<String, String> attributes) Swizzler ID <==> StorablevoidremoveStorable(Storable storable) voidReplace in the Map the storables by their ID storable -> IDvoidupdateArrayOfReferences(Storable[] array, Storable[] updatedArray) voidupdateReferences(Storable storable, Storable updated) Updates the references of a storable and its update
-
Method Details
-
registerStorable
Swizzler ID <==> Storable -
removeStorable
-
updateReferences
Updates the references of a storable and its update- Parameters:
storable- the old referenced storableupdated- the updated storable- Throws:
IOException
-
updateArrayOfReferences
- Throws:
IOException
-
getStorable
-
isSwizzled
Check if the specified Storable (or any storable with matching id) has been saved in Swizzler- Parameters:
storable- a Storable instance, may be null- Returns:
- false if specified storable is null, has a null id, or has not been stored in swizzler, true if storable was found in swizzler
-
isSwizzled
-
iterator
Return an iterator on the storable set- Returns:
- the storable iterator.
-
swizzle
Replace in the Map the storables by their ID storable -> ID -
incRC
Increments the Reference Counter of the storable- Parameters:
storable- the target storable
-
decRC
Decrements the Reference Counter of the storable- Parameters:
storable- the target storable
-
isReferrenced
-