com.atlassian.jira.config.properties
Class MemorySwitchToDatabaseBackedPropertiesManager

java.lang.Object
  extended by com.atlassian.jira.config.properties.MemorySwitchToDatabaseBackedPropertiesManager
All Implemented Interfaces:
BackingPropertySetManager

public class MemorySwitchToDatabaseBackedPropertiesManager
extends Object
implements BackingPropertySetManager

A Container for a MemorySwitchToDatabasePropertySet

Since:
v4.4

Constructor Summary
MemorySwitchToDatabaseBackedPropertiesManager()
          Create a PropertySet that is really 2 propertysets.
 
Method Summary
 com.atlassian.util.concurrent.Supplier<? extends com.opensymphony.module.propertyset.PropertySet> getPropertySetSupplier()
           
 void refresh()
          This clears the cache - in this implementation it also switches to database mode
 void switchBackingStore()
          If the backing property set supports switching to different backing storage, then switch - otherwise noop For now the switch is one way
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MemorySwitchToDatabaseBackedPropertiesManager

public MemorySwitchToDatabaseBackedPropertiesManager()
Create a PropertySet that is really 2 propertysets. One is backed by memory - the other by a DB The active propertySet is indicated by hte active flag. When initiallly created the memory backed set is active.

Method Detail

refresh

public void refresh()
This clears the cache - in this implementation it also switches to database mode

Specified by:
refresh in interface BackingPropertySetManager

switchBackingStore

public void switchBackingStore()
Description copied from interface: BackingPropertySetManager
If the backing property set supports switching to different backing storage, then switch - otherwise noop For now the switch is one way

Specified by:
switchBackingStore in interface BackingPropertySetManager

getPropertySetSupplier

public com.atlassian.util.concurrent.Supplier<? extends com.opensymphony.module.propertyset.PropertySet> getPropertySetSupplier()
Specified by:
getPropertySetSupplier in interface BackingPropertySetManager
Returns:
the Supplier that references the underlying property set


Copyright © 2002-2012 Atlassian. All Rights Reserved.