Package org.mule.api.store

Examples of org.mule.api.store.ObjectDoesNotExistException


            }
            return storedValue;
        }
        catch (FileNotFoundException e)
        {
            throw new ObjectDoesNotExistException(e);
        }
        catch (Exception e)
        {
            throw new ObjectStoreException(e);
        }
View Full Code Here


            }
            realKeyToUUIDIndex.removeValue(file.getName());
        }
        else
        {
            throw new ObjectDoesNotExistException();
        }
    }
View Full Code Here

    public T retrieve(Serializable key, String partitionName) throws ObjectStoreException
    {
        T value = getPartition(partitionName).get(key);
        if (value == null)
        {
            throw new ObjectDoesNotExistException();
        }
        return value;
    }
View Full Code Here

    public T remove(Serializable key, String partitionName) throws ObjectStoreException
    {
        T removedValue = getPartition(partitionName).remove(key);
        if (removedValue == null)
        {
            throw new ObjectDoesNotExistException();
        }

        // TODO possibly have a reverse map to make this more efficient
        Iterator<Map.Entry<Long, Serializable>> localIterator = getExpirtyInfoPartition(partitionName).entrySet()
            .iterator();
View Full Code Here

        }

        if (contains(key) == false)
        {
            String message = "Key does not exist: " + key;
            throw new ObjectDoesNotExistException(CoreMessages.createStaticMessage(message));
        }

        return doRetrieve(key);
    }
View Full Code Here

            throw new ObjectStoreException(CoreMessages.objectIsNull("key"));
        }

        if (contains(key) == false)
        {
            throw new ObjectDoesNotExistException();
        }

        return doRemove(key);
    }
View Full Code Here

                throw new ObjectStoreException(message);
            }
        }
        else
        {
            throw new ObjectDoesNotExistException();
        }
    }
View Full Code Here

    @Override
    public T retrieve(Serializable key) throws ObjectStoreException
    {
        if (!store.containsKey(key))
        {
            throw new ObjectDoesNotExistException(new Exception());
        }
        return store.get(key);
    }
View Full Code Here

    @Test(expected = MessagingException.class)
    public void noAuthorizationEvent() throws Exception
    {
        this.exception = true;
        Mockito.when(this.manager.restoreAuthorizationEvent(eventId)).thenThrow(
            new ObjectDoesNotExistException());
        this.adapterWithUrlUsingConfigAsId();
    }
View Full Code Here

    protected T doRemove(Serializable key)
                    throws ObjectStoreException
    {
        T removedValue = doRetrieve(key);
        if (removedValue == null) {
            throw new ObjectDoesNotExistException();
        }
        boolean removed = cache.remove(key);
        if (!removed) {
            throw new ObjectDoesNotExistException();
        }
        return removedValue;
    }
View Full Code Here

TOP

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

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.