Package org.deckfour.xes.model.buffered
Class XAbstractAttributeMapBufferedImpl
- java.lang.Object
-
- org.deckfour.xes.model.buffered.XAbstractAttributeMapBufferedImpl
-
- All Implemented Interfaces:
java.lang.Cloneable,java.util.Map<java.lang.String,XAttribute>,XAttributeMap
- Direct Known Subclasses:
XAttributeMapBufferedImpl
public abstract class XAbstractAttributeMapBufferedImpl extends java.lang.Object implements XAttributeMap
NikeFS2 virtual file system storage-based implementation for the XAttributeMap interface. Makes it possible to store maps of attributes on disk memory, transparent to the user and the using application.- Author:
- Christian W. Guenther (christian@deckfour.org)
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedXAbstractAttributeMapBufferedImpl(XAttributeMapSerializer serializer)Creates a new attribute map.protectedXAbstractAttributeMapBufferedImpl(NikeFS2StorageProvider provider, XAttributeMapSerializer serializer)Creates a new attribute map.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()java.lang.Objectclone()Creates a clone, i.e.booleancontainsKey(java.lang.Object key)booleancontainsValue(java.lang.Object value)protected XAttributeMapdeserialize()Retrieves a quick-access representation of this attribute map for actual usage.java.util.Set<java.util.Map.Entry<java.lang.String,XAttribute>>entrySet()booleanequals(java.lang.Object obj)protected voidfinalize()XAttributeget(java.lang.Object key)inthashCode()booleanisEmpty()java.util.Set<java.lang.String>keySet()XAttributeput(java.lang.String key, XAttribute value)voidputAll(java.util.Map<? extends java.lang.String,? extends XAttribute> t)XAttributeremove(java.lang.Object key)protected voidserialize(XAttributeMap map)Serializes the given attribute map to a disk-buffered representation.intsize()java.lang.StringtoString()java.util.Collection<XAttribute>values()
-
-
-
Constructor Detail
-
XAbstractAttributeMapBufferedImpl
protected XAbstractAttributeMapBufferedImpl(XAttributeMapSerializer serializer)
Creates a new attribute map.- Parameters:
serializer- The serializer used to serialize this attribute map.
-
XAbstractAttributeMapBufferedImpl
protected XAbstractAttributeMapBufferedImpl(NikeFS2StorageProvider provider, XAttributeMapSerializer serializer)
Creates a new attribute map.- Parameters:
provider- Storage provider to use for serialization.serializer- The serializer used to serialize this attribute map.
-
-
Method Detail
-
deserialize
protected XAttributeMap deserialize() throws java.io.IOException
Retrieves a quick-access representation of this attribute map for actual usage. De-buffers the attribute map and creates an in-memory representation which should be discarded after use to free memory.- Returns:
- In-memory copy of this attribute map.
- Throws:
java.io.IOException
-
serialize
protected void serialize(XAttributeMap map) throws java.io.IOException
Serializes the given attribute map to a disk-buffered representation.- Parameters:
map- Attribute map to be serialized.- Throws:
java.io.IOException
-
clear
public void clear()
- Specified by:
clearin interfacejava.util.Map<java.lang.String,XAttribute>
-
containsKey
public boolean containsKey(java.lang.Object key)
- Specified by:
containsKeyin interfacejava.util.Map<java.lang.String,XAttribute>
-
containsValue
public boolean containsValue(java.lang.Object value)
- Specified by:
containsValuein interfacejava.util.Map<java.lang.String,XAttribute>
-
entrySet
public java.util.Set<java.util.Map.Entry<java.lang.String,XAttribute>> entrySet()
- Specified by:
entrySetin interfacejava.util.Map<java.lang.String,XAttribute>
-
get
public XAttribute get(java.lang.Object key)
- Specified by:
getin interfacejava.util.Map<java.lang.String,XAttribute>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfacejava.util.Map<java.lang.String,XAttribute>
-
keySet
public java.util.Set<java.lang.String> keySet()
- Specified by:
keySetin interfacejava.util.Map<java.lang.String,XAttribute>
-
put
public XAttribute put(java.lang.String key, XAttribute value)
- Specified by:
putin interfacejava.util.Map<java.lang.String,XAttribute>
-
putAll
public void putAll(java.util.Map<? extends java.lang.String,? extends XAttribute> t)
- Specified by:
putAllin interfacejava.util.Map<java.lang.String,XAttribute>
-
remove
public XAttribute remove(java.lang.Object key)
- Specified by:
removein interfacejava.util.Map<java.lang.String,XAttribute>
-
size
public int size()
- Specified by:
sizein interfacejava.util.Map<java.lang.String,XAttribute>
-
values
public java.util.Collection<XAttribute> values()
- Specified by:
valuesin interfacejava.util.Map<java.lang.String,XAttribute>
-
clone
public java.lang.Object clone()
Creates a clone, i.e. deep copy, of this attribute map.- Specified by:
clonein interfaceXAttributeMap- Overrides:
clonein classjava.lang.Object- Returns:
- An identical clone of the attribute map.
-
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equalsin interfacejava.util.Map<java.lang.String,XAttribute>- Overrides:
equalsin classjava.lang.Object
-
finalize
protected void finalize() throws java.lang.Throwable- Overrides:
finalizein classjava.lang.Object- Throws:
java.lang.Throwable
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacejava.util.Map<java.lang.String,XAttribute>- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-