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.queue
Class FilePersistenceStrategy

    java.lang.Object
      org.mule.util.queue.FilePersistenceStrategy

All Implemented Interfaces:
  MuleContextAware, QueuePersistenceStrategy

Direct Known Subclasses:
  EventFilePersistenceStrategy

    public class FilePersistenceStrategy

extends Object
implements QueuePersistenceStrategy, MuleContextAware

Nested Class Summary
`protected static class` | `FilePersistenceStrategy.HolderImpl`

Nested classes/interfaces inherited from interface org.mule.util.queue.QueuePersistenceStrategy
`QueuePersistenceStrategy.Holder`

Field Summary
`static String` | `DEFAULT_QUEUE_STORE` The default queueStore directory for persistence
`static String` | `EXTENSION`
`protected MuleContext` | `muleContext`

Constructor Summary
`FilePersistenceStrategy()`
`FilePersistenceStrategy(WireFormat serializer)`

Method Summary
`void` | `close()` Closes the store.
`protected void` | `createStoreDirectory(File direcetory)`
`boolean` | `isTransient()`
`Object` | `load(String queue, Object id)` Loads an object specified by the given id.
`void` | `open()` Open the store.
`void` | `remove(String queue, Object id)` Removes the object specified by the given id from the store.
`List<QueuePersistenceStrategy.Holder>` | `restore()` Retrieves the ids of the stored objects.
`protected void` | `restoreFiles(File dir, List<QueuePersistenceStrategy.Holder> msgs)`
`void` | `setMuleContext(MuleContext context)`
`Object` | `store(String queue, Object obj)` Stores an object and returns its generated id.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### DEFAULT_QUEUE_STORE

    public static final String DEFAULT_QUEUE_STORE

  The default queueStore directory for persistence

  See Also:
    Constant Field Values

### EXTENSION

    public static final String EXTENSION

See Also:
  Constant Field Values

### muleContext

    protected MuleContext muleContext

Constructor Detail

### FilePersistenceStrategy

    public FilePersistenceStrategy(WireFormat serializer)

### FilePersistenceStrategy

    public FilePersistenceStrategy()

Method Detail

### setMuleContext

    public void setMuleContext(MuleContext context)

  Specified by:
    `setMuleContext` in interface `MuleContextAware`

### store

    public Object store(String queue,
                        Object obj)
                 throws IOException

  Description copied from interface: `QueuePersistenceStrategy`
  Stores an object and returns its generated id.

  Specified by:
    `store` in interface `QueuePersistenceStrategy`
    `obj` - the object to be stored
  Returns:
    the id of the stored object
  Throws:
    `IOException`

### createStoreDirectory

    protected void createStoreDirectory(File direcetory)
                                 throws IOException

  Throws:
    `IOException`

### remove

    public void remove(String queue,
                       Object id)
                throws IOException

  Description copied from interface: `QueuePersistenceStrategy`
  Removes the object specified by the given id from the store.

  Specified by:
    `remove` in interface `QueuePersistenceStrategy`
    `id` - the id of the stored object
  Throws:
    `IOException`

### load

    public Object load(String queue,
                       Object id)
                throws IOException

  Description copied from interface: `QueuePersistenceStrategy`
  Loads an object specified by the given id.

  Specified by:
    `load` in interface `QueuePersistenceStrategy`
    `id` - the id of the stored object
  Returns:
    the object
  Throws:
    `IOException`

### restore

    public List<QueuePersistenceStrategy.Holder> restore()
                                                  throws IOException

  Description copied from interface: `QueuePersistenceStrategy`
  Retrieves the ids of the stored objects.

  Specified by:
    `restore` in interface `QueuePersistenceStrategy`
  Returns:
    the list of ids
  Throws:
    `IOException`

### restoreFiles

    protected void restoreFiles(File dir,
                                List<QueuePersistenceStrategy.Holder> msgs)
                         throws IOException,
                                ClassNotFoundException

  Throws:
    `IOException`
    `ClassNotFoundException`

### open

    public void open()
              throws IOException

  Description copied from interface: `QueuePersistenceStrategy`
  Open the store.

  Specified by:
    `open` in interface `QueuePersistenceStrategy`
  Throws:
    `IOException`

### close

    public void close()
               throws IOException

  Description copied from interface: `QueuePersistenceStrategy`
  Closes the store.

  Specified by:
    `close` in interface `QueuePersistenceStrategy`
  Throws:
    `IOException`

### isTransient

    public boolean isTransient()

  Specified by:
    `isTransient` in interface `QueuePersistenceStrategy`

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-2009 MuleSource, Inc.. All Rights Reserved.