Package org.mule.api.store

Examples of org.mule.api.store.ObjectStoreException


     */
    private void notNullKey(Serializable key) throws ObjectStoreException
    {
        if (key == null)
        {
            throw new ObjectStoreException(CoreMessages.objectIsNull("id"));
        }
    }
View Full Code Here


            return result;
        }
        catch (SQLException e)
        {
            throw new ObjectStoreException(e);
        }
        catch (Exception e)
        {
            throw new ObjectStoreException(e);
        }
    }
View Full Code Here

            return result;
        }
        catch (SQLException e)
        {
            throw new ObjectStoreException(e);
        }
        catch (Exception e)
        {
            throw new ObjectStoreException(e);
        }
    }
View Full Code Here

    public boolean contains(Serializable key) throws ObjectStoreException
    {
        if (key == null)
        {
            throw new ObjectStoreException(CoreMessages.objectIsNull("key"));
        }
        return doContains(key);
    }
View Full Code Here

    public void store(Serializable key, T value) throws ObjectStoreException
    {
        if (key == null)
        {
            throw new ObjectStoreException(CoreMessages.objectIsNull("key"));
        }

        if (contains(key))
        {
            throw new ObjectAlreadyExistsException();
View Full Code Here

    public T retrieve(Serializable key) throws ObjectStoreException
    {
        if (key == null)
        {
            throw new ObjectStoreException(CoreMessages.objectIsNull("key"));
        }

        if (contains(key) == false)
        {
            String message = "Key does not exist: " + key;
View Full Code Here

    public T remove(Serializable key) throws ObjectStoreException
    {
        if (key == null)
        {
            throw new ObjectStoreException(CoreMessages.objectIsNull("key"));
        }

        if (contains(key) == false)
        {
            throw new ObjectDoesNotExistException();
View Full Code Here

        catch (MuleRuntimeException mre)
        {
            // FileUtils throws a MuleRuntimeException if something goes wrong when creating the
            // path. To fully conform to the ObjectStore contract we cannot just let it bubble
            // through but rather catch it and re-throw as ObjectStoreException
            throw new ObjectStoreException(mre);
        }
    }
View Full Code Here

        // To support concurrency we need to check if directory exists again inside
        // synchronized method
        if (!directory.exists() && !directory.mkdirs())
        {
            Message message = CoreMessages.failedToCreate("queue store store directory " + directory.getAbsolutePath());
            throw new ObjectStoreException(message);
        }
    }
View Full Code Here

            return keys;
        }
        catch (ClassNotFoundException e)
        {
            String message = String.format("Could not restore from %1s", storeDirectory.getAbsolutePath());
            throw new ObjectStoreException(CoreMessages.createStaticMessage(message));
        }
        catch (IOException e)
        {
            String message = String.format("Could not restore from %1s", storeDirectory.getAbsolutePath());
            throw new ObjectStoreException(CoreMessages.createStaticMessage(message));
        }
    }
View Full Code Here

TOP

Related Classes of org.mule.api.store.ObjectStoreException

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.