Package org.apache.activemq.kaha.impl.container

Examples of org.apache.activemq.kaha.impl.container.ContainerId


    protected ListContainerImpl getStoreList(Object id) throws Exception{
        String containerName="test";
        DataManager dm=store.getDataManager(containerName);
        IndexManager im=store.getIndexManager(dm,containerName);
        ContainerId containerId=new ContainerId();
        containerId.setKey(id);
        containerId.setDataContainerName(containerName);
        IndexItem root=store.getListsContainer().addRoot(im,containerId);
        ListContainerImpl result=new ListContainerImpl(containerId,root,im,dm,IndexTypes.DISK_INDEX);
        result.expressDataInterest();
        result.setMaximumCacheSize(MAX_CACHE_SIZE);
        return result;
View Full Code Here


        return doesMapContainerExist(id,DEFAULT_CONTAINER_NAME);
    }

    public boolean doesMapContainerExist(Object id,String containerName) throws IOException{
        initialize();
        ContainerId containerId=new ContainerId();
        containerId.setKey(id);
        containerId.setDataContainerName(containerName);
        return maps.containsKey(containerId)||mapsContainer.doesRootExist(containerId);
    }
View Full Code Here

    }

    public synchronized MapContainer getMapContainer(Object id,String containerName,String indexType)
            throws IOException{
        initialize();
        ContainerId containerId=new ContainerId();
        containerId.setKey(id);
        containerId.setDataContainerName(containerName);
        MapContainerImpl result=(MapContainerImpl)maps.get(containerId);
        if(result==null){
            DataManager dm=getDataManager(containerName);
            IndexManager im=getIndexManager(dm,containerName);
            IndexItem root=mapsContainer.getRoot(im,containerId);
View Full Code Here

        deleteMapContainer(id,DEFAULT_CONTAINER_NAME);
    }

    public void deleteMapContainer(Object id,String containerName) throws IOException{
        initialize();
        ContainerId containerId=new ContainerId();
        containerId.setKey(id);
        containerId.setDataContainerName(containerName);
        MapContainerImpl container=(MapContainerImpl)maps.remove(containerId);
        if(container!=null){
            container.clear();
            mapsContainer.removeRoot(container.getIndexManager(),containerId);
        }
View Full Code Here

    public Set getMapContainerIds() throws IOException{
        initialize();
        Set set = new HashSet();
        for (Iterator i = mapsContainer.getKeys().iterator(); i.hasNext();) {
            ContainerId id = (ContainerId)i.next();
            set.add(id.getKey());
        }
        return set;
    }
View Full Code Here

        return doesListContainerExist(id,DEFAULT_CONTAINER_NAME);
    }

    public boolean doesListContainerExist(Object id,String containerName) throws IOException{
        initialize();
        ContainerId containerId=new ContainerId();
        containerId.setKey(id);
        containerId.setDataContainerName(containerName);
        return lists.containsKey(containerId)||listsContainer.doesRootExist(containerId);
    }
View Full Code Here

    }

    public synchronized ListContainer getListContainer(Object id,String containerName,String indexType)
            throws IOException{
        initialize();
        ContainerId containerId=new ContainerId();
        containerId.setKey(id);
        containerId.setDataContainerName(containerName);
        ListContainerImpl result=(ListContainerImpl)lists.get(containerId);
        if(result==null){
            DataManager dm=getDataManager(containerName);
            IndexManager im=getIndexManager(dm,containerName);
           
View Full Code Here

        deleteListContainer(id,DEFAULT_CONTAINER_NAME);
    }

    public void deleteListContainer(Object id,String containerName) throws IOException{
        initialize();
        ContainerId containerId=new ContainerId();
        containerId.setKey(id);
        containerId.setDataContainerName(containerName);
        ListContainerImpl container=(ListContainerImpl)lists.remove(containerId);
        if(container!=null){
            listsContainer.removeRoot(container.getIndexManager(),containerId);
            container.clear();
        }
View Full Code Here

    public Set getListContainerIds() throws IOException{
        initialize();
        Set set = new HashSet();
        for (Iterator i = listsContainer.getKeys().iterator(); i.hasNext();) {
            ContainerId id = (ContainerId)i.next();
            set.add(id.getKey());
        }
        return set;
    }
View Full Code Here

     * scans the directory and builds up the IndexManager and DataManager
     * @throws IOException
     */
    private void generateInterestInListDataFiles() throws IOException {
        for (Iterator i = listsContainer.getKeys().iterator(); i.hasNext();) {
            ContainerId id = (ContainerId)i.next();
            DataManager dm = getDataManager(id.getDataContainerName());
            IndexManager im = getIndexManager(dm,id.getDataContainerName());
            IndexItem theRoot=listsContainer.getRoot(im,id);
            long nextItem=theRoot.getNextItem();
            while(nextItem!=Item.POSITION_NOT_SET){
                IndexItem item=im.getIndex(nextItem);
                item.setOffset(nextItem);
View Full Code Here

TOP

Related Classes of org.apache.activemq.kaha.impl.container.ContainerId

Copyright © 2018 www.massapicom. 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.