public class PersistentObjectStorePartition<T extends Serializable> extends Object implements ListableObjectStore<T>, ExpirableObjectStore<T>
| Modifier and Type | Class and Description |
|---|---|
static class |
PersistentObjectStorePartition.StoreValue<T> |
| Modifier and Type | Field and Description |
|---|---|
static String |
CORRUPTED_FOLDER |
| Modifier and Type | Method and Description |
|---|---|
List<Serializable> |
allKeys() |
void |
clear() |
void |
close()
Close the underlying store.
|
boolean |
contains(Serializable key) |
protected void |
createDirectory(File directory) |
protected File |
createFileToStoreObject() |
protected File |
createOrRetrievePartitionDescriptorFile() |
protected void |
deleteStoreFile(File file) |
protected PersistentObjectStorePartition.StoreValue<T> |
deserialize(File file) |
void |
expire(long entryTTL,
int maxEntries) |
String |
getPartitionName() |
boolean |
isPersistent() |
void |
open()
Open the underlying store.
|
T |
remove(Serializable key) |
T |
retrieve(Serializable key) |
protected void |
serialize(File outputFile,
PersistentObjectStorePartition.StoreValue<T> storeValue) |
void |
store(Serializable key,
T value) |
public static final String CORRUPTED_FOLDER
public void open()
throws org.mule.runtime.api.store.ObjectStoreException
ListableObjectStoreopen in interface ListableObjectStore<T extends Serializable>org.mule.runtime.api.store.ObjectStoreException - if an exception occurred while opening the underlying store.public void close()
throws org.mule.runtime.api.store.ObjectStoreException
ListableObjectStoreclose in interface ListableObjectStore<T extends Serializable>org.mule.runtime.api.store.ObjectStoreException - if an exception occurred while closing the underlying store.public List<Serializable> allKeys() throws org.mule.runtime.api.store.ObjectStoreException
allKeys in interface ListableObjectStore<T extends Serializable>org.mule.runtime.api.store.ObjectStoreException - if an exception occurred while collecting the list of all keys.public boolean contains(Serializable key) throws org.mule.runtime.api.store.ObjectStoreException
contains in interface org.mule.runtime.api.store.ObjectStore<T extends Serializable>org.mule.runtime.api.store.ObjectStoreExceptionpublic void store(Serializable key, T value) throws org.mule.runtime.api.store.ObjectStoreException
store in interface org.mule.runtime.api.store.ObjectStore<T extends Serializable>org.mule.runtime.api.store.ObjectStoreExceptionpublic void clear()
throws org.mule.runtime.api.store.ObjectStoreException
clear in interface org.mule.runtime.api.store.ObjectStore<T extends Serializable>org.mule.runtime.api.store.ObjectStoreExceptionpublic T retrieve(Serializable key) throws org.mule.runtime.api.store.ObjectStoreException
retrieve in interface org.mule.runtime.api.store.ObjectStore<T extends Serializable>org.mule.runtime.api.store.ObjectStoreExceptionpublic T remove(Serializable key) throws org.mule.runtime.api.store.ObjectStoreException
remove in interface org.mule.runtime.api.store.ObjectStore<T extends Serializable>org.mule.runtime.api.store.ObjectStoreExceptionpublic boolean isPersistent()
isPersistent in interface org.mule.runtime.api.store.ObjectStore<T extends Serializable>public void expire(long entryTTL,
int maxEntries)
throws org.mule.runtime.api.store.ObjectStoreException
expire in interface ExpirableObjectStore<T extends Serializable>org.mule.runtime.api.store.ObjectStoreExceptionprotected void createDirectory(File directory) throws org.mule.runtime.api.store.ObjectStoreException
org.mule.runtime.api.store.ObjectStoreExceptionprotected File createFileToStoreObject() throws org.mule.runtime.api.store.ObjectStoreException
org.mule.runtime.api.store.ObjectStoreExceptionprotected File createOrRetrievePartitionDescriptorFile() throws org.mule.runtime.api.store.ObjectStoreException
org.mule.runtime.api.store.ObjectStoreExceptionprotected void serialize(File outputFile, PersistentObjectStorePartition.StoreValue<T> storeValue) throws org.mule.runtime.api.store.ObjectStoreException
org.mule.runtime.api.store.ObjectStoreExceptionprotected PersistentObjectStorePartition.StoreValue<T> deserialize(File file) throws org.mule.runtime.api.store.ObjectStoreException
org.mule.runtime.api.store.ObjectStoreExceptionprotected void deleteStoreFile(File file) throws org.mule.runtime.api.store.ObjectStoreException
org.mule.runtime.api.store.ObjectStoreExceptionpublic String getPartitionName()
Copyright © 2003–2017 MuleSoft, Inc.. All rights reserved.