feedback / send your comments
mail to luc peuvrier
chat channel
joafip users mailing list

En Français

Joafip persistable collections

Java native collection implementation ( or GNU Trove collection for example) can be persisted by JOAFIP since it can invoke their serialization methods, or substituted at write.
But these implementations are not the best for an efficient lazy load and for few memory usage.
JOAFIP collections have additionals features.

So the below collection are provided by JOAFIP to have a more efficient persistence:

PLinkedList (*) - a linked list as java.util.LinkedList, see PTreeList alternative
PTreeList (*)(**) - a tree linked list
PArrayList (*) (**)- an array list as java.util.ArrayList, see PTreeList alternative
PLinkedHashSet (*)(**) - a linked hashset as java.util.LinkedHashSet, see PLinkedTreeSet when element are comparable
PLinkedTreeSet (**) - a linked treeset
PHashSet (*) as java.util.HashSet
PTreeSet as java.util.TreeSet
PLinkedHashMap (*) as java.util.LinkedHashMap
PHashMap (*) as java.util.HashMap
PTreeMap as java.util.TreeMap

Wrapper factory implementation PCollections to obtains here below collecction wrapper implementation:

additional JOAFIP feature:

all are listenable
(*)  an implementation of IEqualsHashComparator can be pass to override the equals/hashcode of stored object
(**) also implement Deque and List

Additional Collection interface implementation:

PTreeList, an alternative of ArrayList and LinkedList
PLinkedTreeSet, an alternative of LinkedHashSet and PLinkedHashSet when elements are comparable
PLinkedTreeMap, an alternative of LinkedHashMap and PLinkedHashMap when keys are comparable

Iterators instance are also persistable.

Arrays are not good for lazy load efficiency because it load all array in memory, this is bad for memory usage in case of lot of data. Array list and Sun hash based collections internaly use array. Alternatives are PTreeList and JOAFIP hash based collection implementations.

feedback / send your comments
mail to luc peuvrier
chat channel
joafip users mailing list

Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 Unported License.
© 2007-2012, joafip