Package org.mule.api.store

Examples of org.mule.api.store.ObjectStoreException


        {
            throw new ObjectDoesNotExistException(e);
        }
        catch (Exception e)
        {
            throw new ObjectStoreException(e);
        }
        finally
        {
            if (objectInputStream != null)
            {
View Full Code Here


        {
            if (!file.delete())
            {
                Message message = CoreMessages.createStaticMessage("Deleting " + file.getAbsolutePath()
                                                                   + " failed");
                throw new ObjectStoreException(message);
            }
            realKeyToUUIDIndex.removeValue(file.getName());
        }
        else
        {
View Full Code Here

            buf.append(id).append("=").append(item).append(IOUtils.LINE_SEPARATOR);
            output.write(buf.toString().getBytes());
        }
        catch (IOException iox)
        {
            throw new ObjectStoreException(iox);
        }
    }
View Full Code Here

            true, 10, 10000, 200));
    }

    private void testObjectStore(ListableObjectStore<String> store) throws ObjectStoreException
    {
        ObjectStoreException e = null;
        store.store("key1", "value1");
        assertEquals("value1", store.retrieve("key1"));
        assertTrue(store.contains("key1"));

        store.clear();
View Full Code Here

    private PersistentObjectStorePartition<T> getPartitionObjectStore(String partitionName) throws ObjectStoreException
    {
        if (!partitionsByName.containsKey(partitionName))
        {
            throw new ObjectStoreException(CoreMessages.createStaticMessage("No partition named: " + partitionName));
        }
        return partitionsByName.get(partitionName);
    }
View Full Code Here

    @Override
    protected void doStore(Serializable key, T value) throws ObjectStoreException
    {
        if (value == null)
        {
            throw new ObjectStoreException(CoreMessages.objectIsNull("value"));
        }

        map.put(key, value);
    }
View Full Code Here

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

    @Override
    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

    @Override
    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

    @Override
    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

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.