View Javadoc

1   /*
2    * $Id: PartitionableObjectStore.java 22512 2011-07-22 04:20:29Z dirk.olmes $
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
5    *
6    * The software in this package is published under the terms of the CPAL v1.0
7    * license, a copy of which has been included with this distribution in the
8    * LICENSE.txt file.
9    */
10  
11  package org.mule.api.store;
12  
13  import java.io.Serializable;
14  import java.util.List;
15  
16  public interface PartitionableObjectStore<T extends Serializable> extends ListableObjectStore<T>
17  {
18      boolean contains(Serializable key, String partitionName) throws ObjectStoreException;
19  
20      void store(Serializable key, T value, String partitionName) throws ObjectStoreException;
21  
22      T retrieve(Serializable key, String partitionName) throws ObjectStoreException;
23  
24      T remove(Serializable key, String partitionName) throws ObjectStoreException;
25  
26      List<Serializable> allKeys(String partitionName) throws ObjectStoreException;
27  
28      List<String> allPartitions() throws ObjectStoreException;
29  
30      void open(String partitionName) throws ObjectStoreException;
31  
32      void close(String partitionName) throws ObjectStoreException;
33  
34      void disposePartition(String partitionName) throws ObjectStoreException;
35  }