Examples of ObjectStoreException


Examples of org.mule.api.store.ObjectStoreException

        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

Examples of org.mule.api.store.ObjectStoreException

        // 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

Examples of org.mule.api.store.ObjectStoreException

            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

Examples of org.mule.api.store.ObjectStoreException

            FileOutputStream out = new FileOutputStream(outputFile);
            SerializationUtils.serialize(value, out);
        }
        catch (SerializationException se)
        {
            throw new ObjectStoreException(se);
        }
        catch (FileNotFoundException fnfe)
        {
            throw new ObjectStoreException(fnfe);
        }
    }
View Full Code Here

Examples of org.mule.api.store.ObjectStoreException

        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

Examples of org.mule.api.store.ObjectStoreException

            FileInputStream in = new FileInputStream(file);
            return (T)SerializationUtils.deserialize(in, muleContext);
        }
        catch (SerializationException se)
        {
            throw new ObjectStoreException(se);
        }
        catch (FileNotFoundException fnfe)
        {
            throw new ObjectStoreException(fnfe);
        }
    }
View Full Code Here

Examples of org.mule.api.store.ObjectStoreException

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

Examples of org.mule.api.store.ObjectStoreException

    @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

Examples of org.mule.api.store.ObjectStoreException

     */
    public boolean contains(Serializable key) throws ObjectStoreException
    {
        if (key == null)
        {
            throw new ObjectStoreException(CoreMessages.objectIsNull("id"));
        }

        synchronized (store)
        {
            return store.values().contains(new StoredObject<T>(key, null));
View Full Code Here

Examples of org.mule.api.store.ObjectStoreException

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

        // this block is unfortunately necessary to counter a possible race condition
        // between multiple nonatomic calls to containsObject/storeObject
        StoredObject<T> obj = new StoredObject<T>(id, value);
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.