Examples of IndexItem


Examples of net.sf.laja.template.IndexItem

    return new ListIndex();
  }

  @Override
  public IIndexItem createIndexItem() {
    return new IndexItem();
  }
View Full Code Here

Examples of org.apache.activemq.kaha.impl.index.IndexItem

                try {
                    init();
                    index.load();
                    long nextItem = root.getNextItem();
                    while (nextItem != Item.POSITION_NOT_SET) {
                        IndexItem item = indexManager.getIndex(nextItem);
                        StoreLocation data = item.getKeyDataItem();
                        Object key = dataManager.readItem(keyMarshaller, data);
                        if (index.isTransient()) {
                            index.store(key, item);
                        }
                        indexList.add(item);
                        nextItem = item.getNextItem();
                    }
                } catch (IOException e) {
                    LOG.error("Failed to load container " + getId(), e);
                    throw new RuntimeStoreException(e);
                }
View Full Code Here

Examples of org.apache.activemq.kaha.impl.index.IndexItem

     */
    public synchronized boolean containsValue(Object o) {
        load();
        boolean result = false;
        if (o != null) {
            IndexItem item = indexList.getFirst();
            while (item != null) {
                Object value = getValue(item);
                if (value != null && value.equals(o)) {
                    result = true;
                    break;
View Full Code Here

Examples of org.apache.activemq.kaha.impl.index.IndexItem

     *      java.lang.Object)
     */
    public synchronized Object put(Object key, Object value) {
        load();
        Object result = remove(key);
        IndexItem item = write(key, value);
        try {
            index.store(key, item);
        } catch (IOException e) {
            LOG.error("Failed trying to insert key: " + key, e);
            throw new RuntimeException(e);
View Full Code Here

Examples of org.apache.activemq.kaha.impl.index.IndexItem

     */
    public synchronized Object remove(Object key) {
        load();
        try {
            Object result = null;
            IndexItem item = (IndexItem)index.remove(key);
            if (item != null) {
                // refresh the index
                item = (IndexItem)indexList.refreshEntry(item);
                result = getValue(item);
                IndexItem prev = indexList.getPrevEntry(item);
                IndexItem next = indexList.getNextEntry(item);
                indexList.remove(item);
                delete(item, prev, next);
            }
            return result;
        } catch (IOException e) {
View Full Code Here

Examples of org.apache.activemq.kaha.impl.index.IndexItem

    public synchronized boolean removeValue(Object o) {
        load();
        boolean result = false;
        if (o != null) {
            IndexItem item = indexList.getFirst();
            while (item != null) {
                Object value = getValue(item);
                if (value != null && value.equals(o)) {
                    result = true;
                    // find the key
View Full Code Here

Examples of org.apache.activemq.kaha.impl.index.IndexItem

     */
    public synchronized StoreEntry place(Object key, Object value) {
        load();
        try {
            remove(key);
            IndexItem item = write(key, value);
            index.store(key, item);
            indexList.add(item);
            return item;
        } catch (IOException e) {
            LOG.error("Failed trying to place key: " + key, e);
View Full Code Here

Examples of org.apache.activemq.kaha.impl.index.IndexItem

     * @param entry
     * @throws IOException
     */
    public synchronized void remove(StoreEntry entry) {
        load();
        IndexItem item = (IndexItem)entry;
        if (item != null) {
            Object key = getKey(item);
            try {
                index.remove(key);
            } catch (IOException e) {
                LOG.error("Failed trying to remove entry: " + entry, e);
                throw new RuntimeException(e);
            }
            IndexItem prev = indexList.getPrevEntry(item);
            IndexItem next = indexList.getNextEntry(item);
            indexList.remove(item);
            delete(item, prev, next);
        }
    }
View Full Code Here

Examples of org.apache.activemq.kaha.impl.index.IndexItem

        return indexList.getLast();
    }

    public synchronized StoreEntry getNext(StoreEntry entry) {
        load();
        IndexItem item = (IndexItem)entry;
        return indexList.getNextEntry(item);
    }
View Full Code Here

Examples of org.apache.activemq.kaha.impl.index.IndexItem

        return indexList.getNextEntry(item);
    }

    public synchronized StoreEntry getPrevious(StoreEntry entry) {
        load();
        IndexItem item = (IndexItem)entry;
        return indexList.getPrevEntry(item);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.