public class AppConfiguration extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
AppConfiguration.SchedulerCreator |
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_NETWORK_TIMEOUT |
Constructor and Description |
---|
AppConfiguration() |
Modifier and Type | Method and Description |
---|---|
static void |
config(boolean asyncRequest,
AppConfiguration.SchedulerCreator observerSchedulerCreator) |
static void |
configCacheSettings(String imFileDir,
String docDir,
String fileDir,
String queryResultDir,
String commandDir,
String analyticsDir,
cn.leancloud.cache.SystemSetting setting)
config local cache setting.
|
static String |
getAnalyticsCacheDir() |
static String |
getApplicationPackageName() |
static String |
getCommandCacheDir() |
static LCACL |
getDefaultACL() |
static AppConfiguration.SchedulerCreator |
getDefaultScheduler() |
static cn.leancloud.cache.SystemSetting |
getDefaultSetting() |
static String |
getDocumentDir() |
static String |
getFileCacheDir() |
static cn.leancloud.network.NetworkingDetector |
getGlobalNetworkingDetector() |
static String |
getImportantFileDir() |
static JSONParser |
getJsonParser() |
static cn.leancloud.logging.InternalLoggerAdapter |
getLogAdapter() |
static int |
getNetworkTimeout() |
static String |
getQueryResultCacheDir() |
static retrofit2.Converter.Factory |
getRetrofitConverterFactory() |
static String |
getUserAgent() |
static boolean |
isAsynchronized() |
static boolean |
isAutoMergeOperationDataWhenSave() |
static boolean |
isEnableLocalCache() |
static boolean |
isIncognitoMode() |
static boolean |
isLastModifyEnabled() |
static void |
makeSureCacheDirWorkable() |
static void |
setApplicationPackageName(String applicationPackageName) |
static void |
setAutoMergeOperationDataWhenSave(boolean flag)
Set default behavior for object save operation.
|
static void |
setConverterFactory(ConverterFactory cf) |
static void |
setDefaultACL(LCACL acl) |
static void |
setEnableLocalCache(boolean enableLocalCache)
set flag to enable local cache or not.
|
static void |
setGlobalNetworkingDetector(cn.leancloud.network.NetworkingDetector globalNetworkingDetector) |
static void |
setIncognitoMode(boolean mode) |
static void |
setLastModifyEnabled(boolean val) |
static void |
setLogAdapter(cn.leancloud.logging.InternalLoggerAdapter adapter) |
static void |
setMimeTypeDetector(cn.leancloud.utils.FileUtil.MimeTypeDetector detector) |
static void |
setNetworkTimeout(int seconds) |
public static final int DEFAULT_NETWORK_TIMEOUT
public static void setNetworkTimeout(int seconds)
public static int getNetworkTimeout()
public static void setLastModifyEnabled(boolean val)
public static boolean isLastModifyEnabled()
public static LCACL getDefaultACL()
public static void setDefaultACL(LCACL acl)
public static void setLogAdapter(cn.leancloud.logging.InternalLoggerAdapter adapter)
public static cn.leancloud.logging.InternalLoggerAdapter getLogAdapter()
public static String getUserAgent()
public static void setIncognitoMode(boolean mode)
public static boolean isIncognitoMode()
public static void setConverterFactory(ConverterFactory cf)
public static retrofit2.Converter.Factory getRetrofitConverterFactory()
public static JSONParser getJsonParser()
public static void config(boolean asyncRequest, AppConfiguration.SchedulerCreator observerSchedulerCreator)
public static boolean isEnableLocalCache()
public static void setEnableLocalCache(boolean enableLocalCache)
enableLocalCache
- flag to enable local cache or notpublic static boolean isAutoMergeOperationDataWhenSave()
public static void setAutoMergeOperationDataWhenSave(boolean flag)
flag
- flag to indicate whether enable auto merge operation data or not, default is falsepublic static boolean isAsynchronized()
public static AppConfiguration.SchedulerCreator getDefaultScheduler()
public static void makeSureCacheDirWorkable()
public static void configCacheSettings(String imFileDir, String docDir, String fileDir, String queryResultDir, String commandDir, String analyticsDir, cn.leancloud.cache.SystemSetting setting)
imFileDir
- im file cache directory.docDir
- document cache directory.fileDir
- file cache directory.queryResultDir
- query result cache directory.commandDir
- command cache directory.analyticsDir
- analytics cache directory.setting
- other settings.public static String getAnalyticsCacheDir()
public static String getCommandCacheDir()
public static String getImportantFileDir()
public static String getDocumentDir()
public static String getFileCacheDir()
public static String getQueryResultCacheDir()
public static String getApplicationPackageName()
public static void setApplicationPackageName(String applicationPackageName)
public static cn.leancloud.cache.SystemSetting getDefaultSetting()
public static cn.leancloud.network.NetworkingDetector getGlobalNetworkingDetector()
public static void setGlobalNetworkingDetector(cn.leancloud.network.NetworkingDetector globalNetworkingDetector)
public static void setMimeTypeDetector(cn.leancloud.utils.FileUtil.MimeTypeDetector detector)
Copyright © 2020, 美味书签(北京)信息技术有限公司 All rights reserved.