Package net.timewalker.ffmq3.storage.data

Examples of net.timewalker.ffmq3.storage.data.DataStoreException


   */
  public void checkPermission(String resourceName, String action) throws JMSException
  {
    for (int i = 0; i < privileges.size(); i++)
    {
      Privilege privilege = (Privilege)privileges.get(i);
      if (privilege.matches(resourceName, action))
        return;
    }
    throw new FFMQException("Access denied to resource '"+resourceName+"' for action '"+action+"'","ACCESS_DENIED");
  }
View Full Code Here


            currentUser.setName(getRequired(attributes, "name"));
            currentUser.setPassword(getRequired(attributes, "password"));
        }
        if (currentPath.equals("security/users/user/privilege"))
        {
            currentPrivilege = new Privilege();
            currentPrivilege.setResourcePattern(getRequired(attributes, "resource"));
            currentPrivilege.setActions(getRequired(attributes, "actions"));
        }
    }
View Full Code Here

            this.data = newData;
            this.locks.ensureCapacity(newSize);
        }
        catch (OutOfMemoryError e)
        {
            throw new DataStoreException("["+name+"] Cannot extend in-memory datastore to "+newSize);
        }
       
        return true;
    }
View Full Code Here

    private void checkHandle( int handle ) throws DataStoreException
    {
        if (handle < 0 ||
            handle >= data.length ||
            data[handle] == null)
            throw new DataStoreException(name+" : Invalid handle : "+handle);
    }
View Full Code Here

    {
        if (SAFE_MODE) checkHandle(handle);
        if (!locks.flip(handle))
        {
            locks.flip(handle); // Restore state
            throw new DataStoreException("Handle already locked : "+handle);
        }
    }
View Full Code Here

    {
        if (SAFE_MODE) checkHandle(handle);
        if (locks.flip(handle))
        {
            locks.flip(handle); // Restore state
            throw new DataStoreException("Handle was not locked : "+handle);
        }
    }
View Full Code Here

        log.debug("Initializing store '"+baseName+"' filesystem");
        try
        {
            allocationTableFile = new File(dataFolder,baseName+ALLOCATION_TABLE_SUFFIX);
            if (!allocationTableFile.canRead())
                throw new DataStoreException("Cannot access store allocation table : "+allocationTableFile.getAbsolutePath());
            allocationTableRandomAccessFile = new RandomAccessFile(allocationTableFile,"rw");
           
            dataFile = new File(dataFolder,baseName+DATA_FILE_SUFFIX);
            if (!dataFile.canRead())
                throw new DataStoreException("Cannot access store data file : "+dataFile.getAbsolutePath());
            dataRandomAccessFile = new RandomAccessFile(dataFile,"rw");
        }
        catch (FileNotFoundException e)
        {
            throw new DataStoreException("Cannot access file : "+e.getMessage());
        }
    }
View Full Code Here

           
            log.debug(msgCount+" entries found");
        }
        catch (EOFException e)
        {
            throw new DataStoreException("Allocation table is truncated : "+allocationTableFile.getAbsolutePath(),e);
        }
        catch (IOException e)
        {
            throw new DataStoreException("Cannot initialize allocation table : "+allocationTableFile.getAbsolutePath(),e);
        }
        finally
        {
            if (in != null)
            {
View Full Code Here

                return pos;
            }
           
            pos++;
        }
        throw new DataStoreException("Allocation table is full ("+blockCount+" blocks)");
    }
View Full Code Here

    {
        if (handle < 0 ||
            handle >= blockCount ||
            allocatedSize[handle] == -1 ||
            (flags[handle] & FLAG_START_BLOCK) == 0)
            throw new DataStoreException("Invalid handle : "+handle);
    }
View Full Code Here

TOP

Related Classes of net.timewalker.ffmq3.storage.data.DataStoreException

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.