Class PListImpl
- java.lang.Object
-
- org.apache.activemq.store.kahadb.disk.index.ListIndex<String,Location>
-
- org.apache.activemq.store.kahadb.plist.PListImpl
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.activemq.store.PList
PList.PListIterator
-
-
Field Summary
-
Fields inherited from class org.apache.activemq.store.kahadb.disk.index.ListIndex
headPageId, loaded, NOT_SET, pageFile, tailPageId
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Locationadd(Transaction tx, String key, Location value)ObjectaddFirst(String id, ByteSequence bs)LocationaddFirst(Transaction tx, String key, Location value)ObjectaddLast(String id, ByteSequence bs)voidclaimFileLocations(Set<Integer> candidates)voidclear(Transaction tx)clear the indexvoiddestroy()PListEntryget(long position)PListEntrygetFirst()PListEntrygetLast()StringgetName()booleanisEmpty()PList.PListIteratoriterator()longmessageSize()protected voidonLoad(ListNode<String,Location> node, Transaction tx)voidonRemove(Map.Entry<String,Location> removed)booleanremove(long position)booleanremove(Object l)booleanremove(String id)voidsetName(String name)StringtoString()voidwrite(DataOutput out)-
Methods inherited from class org.apache.activemq.store.kahadb.disk.index.ListIndex
containsKey, createNode, get, getFirst, getHead, getHeadPageId, getKeyMarshaller, getLast, getPageFile, getTail, getTailPageId, getValueMarshaller, isEmpty, isTransient, iterator, iterator, listNodeIterator, load, put, remove, setHeadPageId, setKeyMarshaller, setPageFile, setTailPageId, setValueMarshaller, size, storeNode, unload
-
-
-
-
Method Detail
-
setName
public void setName(String name)
-
write
public void write(DataOutput out) throws IOException
- Throws:
IOException
-
destroy
public void destroy() throws IOException- Specified by:
destroyin interfacePList- Throws:
IOException
-
addLast
public Object addLast(String id, ByteSequence bs) throws IOException
- Specified by:
addLastin interfacePList- Throws:
IOException
-
addFirst
public Object addFirst(String id, ByteSequence bs) throws IOException
- Specified by:
addFirstin interfacePList- Throws:
IOException
-
remove
public boolean remove(Object l) throws IOException
- Specified by:
removein interfacePList- Throws:
IOException
-
remove
public boolean remove(String id) throws IOException
- Throws:
IOException
-
remove
public boolean remove(long position) throws IOException- Throws:
IOException
-
get
public PListEntry get(long position) throws IOException
- Throws:
IOException
-
getFirst
public PListEntry getFirst() throws IOException
- Throws:
IOException
-
getLast
public PListEntry getLast() throws IOException
- Throws:
IOException
-
iterator
public PList.PListIterator iterator() throws IOException
- Specified by:
iteratorin interfacePList- Throws:
IOException
-
claimFileLocations
public void claimFileLocations(Set<Integer> candidates) throws IOException
- Throws:
IOException
-
messageSize
public long messageSize()
- Specified by:
messageSizein interfacePList
-
add
public Location add(Transaction tx, String key, Location value) throws IOException
- Overrides:
addin classListIndex<String,Location>- Throws:
IOException
-
addFirst
public Location addFirst(Transaction tx, String key, Location value) throws IOException
- Overrides:
addFirstin classListIndex<String,Location>- Throws:
IOException
-
clear
public void clear(Transaction tx) throws IOException
Description copied from interface:Indexclear the index
-
onLoad
protected void onLoad(ListNode<String,Location> node, Transaction tx)
-
-