com.microsoft.tfs.core.config.persistence
Class DefaultPersistenceStoreProvider

java.lang.Object
  extended by com.microsoft.tfs.core.config.persistence.DefaultPersistenceStoreProvider
All Implemented Interfaces:
PersistenceStoreProvider

public class DefaultPersistenceStoreProvider
extends java.lang.Object
implements PersistenceStoreProvider

A default implementation of the PersistenceStoreProvider interface that uses standard discovery mechanisms (common with Visual Studio) to locate the cache and configuration file directories.

This class is a singleton. Access the instance through INSTANCE.

See Also:
PersistenceStoreProvider
Since:
TEE-SDK-11.0
Thread-safety:
thread-safe

Field Summary
protected static java.lang.String APPLICATION_NAME
           
protected static java.lang.String CACHE_CHILD_NAME
           
protected static java.lang.String CONFIGURATION_CHILD_NAME
           
static DefaultPersistenceStoreProvider INSTANCE
          Singleton instance of this class.
protected static java.lang.String LOG_CHILD_NAME
           
protected static java.lang.String VENDOR_NAME
           
protected static java.lang.String VERSION
           
 
Constructor Summary
protected DefaultPersistenceStoreProvider()
          Most uses of this class should be through the static INSTANCE field.
 
Method Summary
 boolean equals(java.lang.Object obj)
          
 FilesystemPersistenceStore getCachePersistenceStore()
           Gets the PersistenceStore for storing cache information.
 FilesystemPersistenceStore getConfigurationPersistenceStore()
           Gets the PersistenceStore for storing non-cache configuration information.
 FilesystemPersistenceStore getLogPersistenceStore()
           Gets the PersistenceStore for storing log files.
 int hashCode()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VENDOR_NAME

protected static final java.lang.String VENDOR_NAME
Constant Field Value:
"Microsoft"
See Also:
Constant Field Values

APPLICATION_NAME

protected static final java.lang.String APPLICATION_NAME
Constant Field Value:
"Team Foundation"
See Also:
Constant Field Values

VERSION

protected static final java.lang.String VERSION
Constant Field Value:
"4.0"
See Also:
Constant Field Values

CACHE_CHILD_NAME

protected static final java.lang.String CACHE_CHILD_NAME
Constant Field Value:
"Cache"
See Also:
Constant Field Values

CONFIGURATION_CHILD_NAME

protected static final java.lang.String CONFIGURATION_CHILD_NAME
Constant Field Value:
"Configuration"
See Also:
Constant Field Values

LOG_CHILD_NAME

protected static final java.lang.String LOG_CHILD_NAME
Constant Field Value:
"Logs"
See Also:
Constant Field Values

INSTANCE

public static final DefaultPersistenceStoreProvider INSTANCE
Singleton instance of this class.

Constructor Detail

DefaultPersistenceStoreProvider

protected DefaultPersistenceStoreProvider()
Most uses of this class should be through the static INSTANCE field. Not private to permit subclassing.

Method Detail

getCachePersistenceStore

public FilesystemPersistenceStore getCachePersistenceStore()

Gets the PersistenceStore for storing cache information. Cache information is information that can be re-created from server data but improves performance to have it locally.

Returns cachePersistenceStore.

Specified by:
getCachePersistenceStore in interface PersistenceStoreProvider
Returns:
a FilesystemPersistenceStore object for storing cache data, never null

getConfigurationPersistenceStore

public FilesystemPersistenceStore getConfigurationPersistenceStore()

Gets the PersistenceStore for storing non-cache configuration information. User configuration information is unlike cache information in that it cannot be recreated without input from the user.

Returns configurationPersistenceStore.

Specified by:
getConfigurationPersistenceStore in interface PersistenceStoreProvider
Returns:
a FilesystemPersistenceStore object for storing non-cache configuration data, never null

getLogPersistenceStore

public FilesystemPersistenceStore getLogPersistenceStore()

Gets the PersistenceStore for storing log files. Returning null disables logging to files.

Returns #LOG_PERSISTENCE_STORE.

Specified by:
getLogPersistenceStore in interface PersistenceStoreProvider
Returns:
a FilesystemPersistenceStore object for storing non-cache configuration data, null to disable storing log files on disk

equals

public boolean equals(java.lang.Object obj)

Computed using only values returned by public methods. Suitable for derived classes which only modify the values returned by public methods.

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()

Computed using ony values returned by public methods. Suitable for derived classes which only modify the values returned by public methods.

Overrides:
hashCode in class java.lang.Object


© 2015 Microsoft. All rights reserved.