org.mule.util.store
Class PartitionedPersistentObjectStore<T extends Serializable>

java.lang.Object
  extended by org.mule.util.store.AbstractPartitionedObjectStore<T>
      extended by org.mule.util.store.PartitionedPersistentObjectStore<T>
All Implemented Interfaces:
MuleContextAware, ExpirableObjectStore<T>, ListableObjectStore<T>, ObjectStore<T>, PartitionableExpirableObjectStore<T>, PartitionableObjectStore<T>

public class PartitionedPersistentObjectStore<T extends Serializable>
extends AbstractPartitionedObjectStore<T>
implements MuleContextAware, PartitionableExpirableObjectStore<T>


Field Summary
static String OBJECT_STORE_DIR
           
 
Fields inherited from class org.mule.util.store.AbstractPartitionedObjectStore
DEFAULT_PARTITION, logger
 
Constructor Summary
PartitionedPersistentObjectStore()
           
PartitionedPersistentObjectStore(MuleContext context)
           
 
Method Summary
 List<Serializable> allKeys(String partitionName)
           
 List<String> allPartitions()
           
 void clear(String partitionName)
           
 void close(String partitionName)
           
 boolean contains(Serializable key, String partitionName)
           
protected  void createStoreDirectory(File directory)
           
 void disposePartition(String partitionName)
           
 void expire(int entryTTL, int maxEntries)
           
 void expire(int entryTTL, int maxEntries, String partitionName)
           
 boolean isPersistent()
          Is this store persistent?
 void open()
          Open the underlying store.
 void open(String partitionName)
           
 T remove(Serializable key, String partitionName)
           
 T retrieve(Serializable key, String partitionName)
           
 void setMuleContext(MuleContext context)
           
 void store(Serializable key, T value, String partitionName)
           
 
Methods inherited from class org.mule.util.store.AbstractPartitionedObjectStore
allKeys, clear, close, contains, remove, retrieve, store
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.mule.api.store.ListableObjectStore
allKeys, close
 
Methods inherited from interface org.mule.api.store.ObjectStore
clear, contains, remove, retrieve, store
 

Field Detail

OBJECT_STORE_DIR

public static final String OBJECT_STORE_DIR
See Also:
Constant Field Values
Constructor Detail

PartitionedPersistentObjectStore

public PartitionedPersistentObjectStore()

PartitionedPersistentObjectStore

public PartitionedPersistentObjectStore(MuleContext context)
Method Detail

open

public void open()
          throws ObjectStoreException
Description copied from interface: ListableObjectStore
Open the underlying store.

Specified by:
open in interface ListableObjectStore<T extends Serializable>
Overrides:
open in class AbstractPartitionedObjectStore<T extends Serializable>
Throws:
ObjectStoreException - if an exception occurred while opening the underlying store.

open

public void open(String partitionName)
          throws ObjectStoreException
Specified by:
open in interface PartitionableObjectStore<T extends Serializable>
Throws:
ObjectStoreException

close

public void close(String partitionName)
           throws ObjectStoreException
Specified by:
close in interface PartitionableObjectStore<T extends Serializable>
Throws:
ObjectStoreException

isPersistent

public boolean isPersistent()
Description copied from interface: ObjectStore
Is this store persistent?

Specified by:
isPersistent in interface ObjectStore<T extends Serializable>
Returns:
true if this store is persistent

contains

public boolean contains(Serializable key,
                        String partitionName)
                 throws ObjectStoreException
Specified by:
contains in interface PartitionableObjectStore<T extends Serializable>
Throws:
ObjectStoreException

store

public void store(Serializable key,
                  T value,
                  String partitionName)
           throws ObjectStoreException
Specified by:
store in interface PartitionableObjectStore<T extends Serializable>
Throws:
ObjectStoreException

retrieve

public T retrieve(Serializable key,
                  String partitionName)
                                throws ObjectStoreException
Specified by:
retrieve in interface PartitionableObjectStore<T extends Serializable>
Throws:
ObjectStoreException

remove

public T remove(Serializable key,
                String partitionName)
                              throws ObjectStoreException
Specified by:
remove in interface PartitionableObjectStore<T extends Serializable>
Throws:
ObjectStoreException

allKeys

public List<Serializable> allKeys(String partitionName)
                           throws ObjectStoreException
Specified by:
allKeys in interface PartitionableObjectStore<T extends Serializable>
Throws:
ObjectStoreException

clear

public void clear(String partitionName)
           throws ObjectStoreException
Specified by:
clear in interface PartitionableObjectStore<T extends Serializable>
Throws:
ObjectStoreException

allPartitions

public List<String> allPartitions()
                           throws ObjectStoreException
Specified by:
allPartitions in interface PartitionableObjectStore<T extends Serializable>
Throws:
ObjectStoreException

createStoreDirectory

protected void createStoreDirectory(File directory)

setMuleContext

public void setMuleContext(MuleContext context)
Specified by:
setMuleContext in interface MuleContextAware

expire

public void expire(int entryTTL,
                   int maxEntries)
            throws ObjectStoreException
Specified by:
expire in interface ExpirableObjectStore<T extends Serializable>
Throws:
ObjectStoreException

disposePartition

public void disposePartition(String partitionName)
                      throws ObjectStoreException
Specified by:
disposePartition in interface PartitionableObjectStore<T extends Serializable>
Throws:
ObjectStoreException

expire

public void expire(int entryTTL,
                   int maxEntries,
                   String partitionName)
            throws ObjectStoreException
Specified by:
expire in interface PartitionableExpirableObjectStore<T extends Serializable>
Throws:
ObjectStoreException


Copyright © 2003-2014 MuleSoft, Inc.. All Rights Reserved.