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.jgroups.persistence
Class FilePersistenceManager

    java.lang.Object
      org.jgroups.persistence.FilePersistenceManager

All Implemented Interfaces:
  PersistenceManager

    public class FilePersistenceManager

extends java.lang.Object
implements PersistenceManager

Constructor Summary
`FilePersistenceManager(java.lang.String propertiesFilename)` Default constructor

Method Summary
`void` | `clear()` Clears the complete NV state from the DB
`protected java.util.Map` | `filterLoadedValues(java.util.Map in)` Turns the values into Floats to enable `org.jgroups.demos.DistributedHashtableDemo` to work.
`java.io.Serializable` | `remove(java.io.Serializable key)` Remove existing NV from being persisted
`java.util.Map` | `retrieveAll()` Gives back the Map in last known state
`void` | `save(java.io.Serializable key, java.io.Serializable val)` Save new NV pair as serializable objects or if already exist; store new state
`void` | `saveAll(java.util.Map map)` Use to store a complete map into persistent state
`void` | `shutDown()` Used to handle shutdown call the PersistenceManager implementation.

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

Constructor Detail

### FilePersistenceManager

    public FilePersistenceManager(java.lang.String propertiesFilename)
                           throws java.lang.Exception

  Default constructor

  Throws:
    `java.lang.Exception`

Method Detail

### save

    public void save(java.io.Serializable key,
                     java.io.Serializable val)
              throws CannotPersistException

  Save new NV pair as serializable objects or if already exist; store new state

  Specified by:
    `save` in interface `PersistenceManager`
  Throws:
    `CannotPersistException`

### remove

    public java.io.Serializable remove(java.io.Serializable key)
                                throws CannotRemoveException

  Remove existing NV from being persisted

  Specified by:
    `remove` in interface `PersistenceManager`
  Parameters:
    `key` - value
  Returns:
    Serializable; gives back the value
  Throws:
    `CannotRemoveException`

### saveAll

    public void saveAll(java.util.Map map)
                 throws CannotPersistException

  Use to store a complete map into persistent state

  Specified by:
    `saveAll` in interface `PersistenceManager`
  Throws:
    `CannotPersistException;`
    `CannotPersistException`

### retrieveAll

    public java.util.Map retrieveAll()
                              throws CannotRetrieveException

  Gives back the Map in last known state

  Specified by:
    `retrieveAll` in interface `PersistenceManager`
  Returns:
    Map;
  Throws:
    `CannotRetrieveException;`
    `CannotRetrieveException`

### filterLoadedValues

    protected java.util.Map filterLoadedValues(java.util.Map in)

  Turns the values into Floats to enable `org.jgroups.demos.DistributedHashtableDemo` to work. Subclasses should override this method to convert the incoming map of string/string key/value pairs into the types they want.

  Parameters:
    `in` -
  Returns:
    Map

### clear

    public void clear()
               throws CannotRemoveException

  Clears the complete NV state from the DB

  Specified by:
    `clear` in interface `PersistenceManager`
  Throws:
    `CannotRemoveException;` - x
    `CannotRemoveException`

### shutDown

    public void shutDown()

  Used to handle shutdown call the PersistenceManager implementation. Persistent engines can leave this implementation empty.

  Specified by:
    `shutDown` in interface `PersistenceManager`

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 © 1998-2009 Bela Ban / Red Hat. All Rights Reserved.