public interface

PersistService

com.google.inject.persist.PersistService

Class Overview

Persistence provider service. Use this to manage the overall startup and stop of the persistence module(s). TODO(dhanji): Integrate with Service API when appropriate.

Summary

Public Methods
abstract void start()
Starts the underlying persistence engine and makes guice-persist ready for use.
abstract void stop()
Stops the underlying persistence engine.

Public Methods

public abstract void start ()

Starts the underlying persistence engine and makes guice-persist ready for use. For instance, with JPA, it creates an EntityManagerFactory and may open connection pools. This method must be called by your code prior to using any guice-persist or JPA artifacts. If already started, calling this method does nothing, if already stopped, it also does nothing.

public abstract void stop ()

Stops the underlying persistence engine. For instance, with JPA, it closes the EntityManagerFactory. If already stopped, calling this method does nothing. If not yet started, it also does nothing.