Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mule.util.store
Class AbstractMonitoredObjectStore<T extends Serializable>

    java.lang.Object
      org.mule.util.store.AbstractMonitoredObjectStore<T>

All Implemented Interfaces:
  Runnable, MuleContextAware, Disposable, Initialisable, ObjectStore<T>

Direct Known Subclasses:
  InMemoryObjectStore

    public abstract class AbstractMonitoredObjectStore<T extends Serializable>

extends Object
implements ObjectStore<T>, Runnable, MuleContextAware, Initialisable, Disposable

TODO

Field Summary
`protected MuleContext` | `context`
`protected int` | `entryTTL` The time-to-live for each message ID, specified in milliseconds, or -1 for entries that should never expire.
`protected int` | `expirationInterval` The interval for periodic bounded size enforcement and entry expiration, specified in milliseconds.
`protected Log` | `logger`
`protected int` | `maxEntries` the maximum number of entries that this store keeps around.
`protected String` | `name` A name for this store, can be used for logging and identification purposes.
`protected edu.emory.mathcs.backport.java.util.concurrent.ScheduledThreadPoolExecutor` | `scheduler`

Fields inherited from interface org.mule.api.lifecycle.Initialisable
`PHASE_NAME`

Fields inherited from interface org.mule.api.lifecycle.Disposable
`PHASE_NAME`

Constructor Summary
`AbstractMonitoredObjectStore()`

Method Summary
`void` | `dispose()` A lifecycle method where implementor should free up any resources.
`protected abstract void` | `expire()`
`int` | `getEntryTTL()`
`int` | `getExpirationInterval()`
`int` | `getMaxEntries()`
`String` | `getName()`
`edu.emory.mathcs.backport.java.util.concurrent.ScheduledThreadPoolExecutor` | `getScheduler()`
`void` | `initialise()` Method used to perform any initialisation work.
`void` | `run()`
`void` | `setEntryTTL(int entryTTL)`
`void` | `setExpirationInterval(int expirationInterval)`
`void` | `setMaxEntries(int maxEntries)`
`void` | `setMuleContext(MuleContext context)`
`void` | `setName(String id)`
`void` | `setScheduler(edu.emory.mathcs.backport.java.util.concurrent.ScheduledThreadPoolExecutor scheduler)`

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.ObjectStore
`contains, remove, retrieve, store`

Field Detail

### logger

    protected final Log logger

### context

    protected MuleContext context

### scheduler

    protected edu.emory.mathcs.backport.java.util.concurrent.ScheduledThreadPoolExecutor scheduler

### maxEntries

    protected int maxEntries

  the maximum number of entries that this store keeps around. Specify -1 if the store is supposed to be "unbounded".

### entryTTL

    protected int entryTTL

  The time-to-live for each message ID, specified in milliseconds, or -1 for entries that should never expire. DO NOT combine this with an unbounded store!

### expirationInterval

    protected int expirationInterval

  The interval for periodic bounded size enforcement and entry expiration, specified in milliseconds. Arbitrary positive values between 1 millisecond and several hours or days are possible, but should be chosen carefully according to the expected message rate to prevent out of memory conditions.

### name

    protected String name

  A name for this store, can be used for logging and identification purposes.

Constructor Detail

### AbstractMonitoredObjectStore

    public AbstractMonitoredObjectStore()

Method Detail

### initialise

    public void initialise()
                    throws InitialisationException

  Description copied from interface: `Initialisable`
  Method used to perform any initialisation work. If a fatal error occurs during initialisation an `InitialisationException` should be thrown, causing the Mule instance to shutdown. If the error is recoverable, say by retrying to connect, a `RecoverableException` should be thrown. There is no guarantee that by throwing a Recoverable exception that the Mule instance will not shut down.

  Specified by:
    `initialise` in interface `Initialisable`
  Throws:
    `InitialisationException` - if a fatal error occurs causing the Mule instance to shutdown
    `RecoverableException` - if an error occurs that can be recovered from

### run

    public final void run()

  Specified by:
    `run` in interface `Runnable`

### dispose

    public void dispose()

  Description copied from interface: `Disposable`
  A lifecycle method where implementor should free up any resources. If an exception is thrown it should just be logged and processing should continue. This method should not throw Runtime exceptions.

  Specified by:
    `dispose` in interface `Disposable`

### setEntryTTL

    public void setEntryTTL(int entryTTL)

### setExpirationInterval

    public void setExpirationInterval(int expirationInterval)

### setMaxEntries

    public void setMaxEntries(int maxEntries)

### setScheduler

    public void setScheduler(edu.emory.mathcs.backport.java.util.concurrent.ScheduledThreadPoolExecutor scheduler)

### setName

    public void setName(String id)

### setMuleContext

    public void setMuleContext(MuleContext context)

  Specified by:
    `setMuleContext` in interface `MuleContextAware`

### getEntryTTL

    public int getEntryTTL()

### getExpirationInterval

    public int getExpirationInterval()

### getMaxEntries

    public int getMaxEntries()

### getName

    public String getName()

### getScheduler

    public edu.emory.mathcs.backport.java.util.concurrent.ScheduledThreadPoolExecutor getScheduler()

### expire

    protected abstract void expire()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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