Class ArchiveManager
- java.lang.Object
-
- org.jivesoftware.openfire.container.BasicModule
-
- org.jivesoftware.openfire.archive.ArchiveManager
-
- All Implemented Interfaces:
Module
public class ArchiveManager extends BasicModule
A manager of tasks that write archives into storage.- Author:
- Guus der Kinderen, guus.der.kinderen@gmail.com
-
-
Constructor Summary
Constructors Constructor Description ArchiveManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(Archiver archiver)
Adds a new task, that is started immediately.Duration
availabilityETAOnLocalNode(String id, Instant instant)
void
destroy()
Destroys the module, by shutting down the thread pool that is being used to process archiving tasks.void
initialize(XMPPServer server)
Initializes the manager, by instantiating a thread pool that is used to process archiving tasks.void
remove(String id)
Stops and removes an exiting task.void
remove(Archiver archiver)
Stops and removes an exiting task.-
Methods inherited from class org.jivesoftware.openfire.container.BasicModule
getName, start, stop
-
-
-
-
Method Detail
-
initialize
public void initialize(XMPPServer server)
Initializes the manager, by instantiating a thread pool that is used to process archiving tasks.- Specified by:
initialize
in interfaceModule
- Overrides:
initialize
in classBasicModule
- Parameters:
server
- the server hosting this module.
-
destroy
public void destroy()
Destroys the module, by shutting down the thread pool that is being used to process archiving tasks. No new archive tasks will be accepted any longer, although previously scheduled tasks can continue to be processed.- Specified by:
destroy
in interfaceModule
- Overrides:
destroy
in classBasicModule
-
add
public void add(Archiver archiver)
Adds a new task, that is started immediately.- Parameters:
archiver
- The task to be added. Cannot be null.
-
remove
public void remove(Archiver archiver)
Stops and removes an exiting task. No-op when the provided task is not managed by this manager.- Parameters:
archiver
- The task to be added. Cannot be null.
-
remove
public void remove(String id)
Stops and removes an exiting task. No-op when the provided task is not managed by this manager.- Parameters:
id
- The identifier of task to be added. Cannot be null.
-
-