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 Location
add(Transaction tx, String key, Location value)
Object
addFirst(String id, ByteSequence bs)
Location
addFirst(Transaction tx, String key, Location value)
Object
addLast(String id, ByteSequence bs)
void
claimFileLocations(Set<Integer> candidates)
void
clear(Transaction tx)
clear the indexvoid
destroy()
PListEntry
get(long position)
PListEntry
getFirst()
PListEntry
getLast()
String
getName()
boolean
isEmpty()
PList.PListIterator
iterator()
long
messageSize()
protected void
onLoad(ListNode<String,Location> node, Transaction tx)
void
onRemove(Map.Entry<String,Location> removed)
boolean
remove(long position)
boolean
remove(Object l)
boolean
remove(String id)
void
setName(String name)
String
toString()
void
write(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:
destroy
in interfacePList
- Throws:
IOException
-
addLast
public Object addLast(String id, ByteSequence bs) throws IOException
- Specified by:
addLast
in interfacePList
- Throws:
IOException
-
addFirst
public Object addFirst(String id, ByteSequence bs) throws IOException
- Specified by:
addFirst
in interfacePList
- Throws:
IOException
-
remove
public boolean remove(Object l) throws IOException
- Specified by:
remove
in 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:
iterator
in interfacePList
- Throws:
IOException
-
claimFileLocations
public void claimFileLocations(Set<Integer> candidates) throws IOException
- Throws:
IOException
-
messageSize
public long messageSize()
- Specified by:
messageSize
in interfacePList
-
add
public Location add(Transaction tx, String key, Location value) throws IOException
- Overrides:
add
in classListIndex<String,Location>
- Throws:
IOException
-
addFirst
public Location addFirst(Transaction tx, String key, Location value) throws IOException
- Overrides:
addFirst
in classListIndex<String,Location>
- Throws:
IOException
-
clear
public void clear(Transaction tx) throws IOException
Description copied from interface:Index
clear the index
-
onLoad
protected void onLoad(ListNode<String,Location> node, Transaction tx)
-
-