當前位置: 首頁>>代碼示例>>Java>>正文


Java FLog.wtf方法代碼示例

本文整理匯總了Java中com.facebook.common.logging.FLog.wtf方法的典型用法代碼示例。如果您正苦於以下問題:Java FLog.wtf方法的具體用法?Java FLog.wtf怎麽用?Java FLog.wtf使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.facebook.common.logging.FLog的用法示例。


在下文中一共展示了FLog.wtf方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: removeLiveReference

import com.facebook.common.logging.FLog; //導入方法依賴的package包/類
/**
 * Decreases the reference count of live object from the static map. Removes it if it's reference
 * count has become 0.
 *
 * @param value the value to remove.
 */
private static void removeLiveReference(Object value) {
  synchronized (sLiveObjects) {
    Integer count = sLiveObjects.get(value);
    if (count == null) {
      // Uh oh.
      FLog.wtf(
          "SharedReference",
          "No entry in sLiveObjects for value of type %s",
          value.getClass());
    } else if (count == 1) {
      sLiveObjects.remove(value);
    } else {
      sLiveObjects.put(value, count - 1);
    }
  }
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:23,代碼來源:SharedReference.java

示例2: getTrimRatio

import com.facebook.common.logging.FLog; //導入方法依賴的package包/類
@Override
public double getTrimRatio(MemoryTrimType trimType) {
  switch (trimType) {
    case OnCloseToDalvikHeapLimit:
      if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
        return MemoryTrimType.OnCloseToDalvikHeapLimit.getSuggestedTrimRatio();
      } else {
        // On pre-lollipop versions we keep bitmaps on the native heap, so no need to trim here
        // as it wouldn't help Dalvik heap anyway.
        return 0;
      }
    case OnAppBackgrounded:
    case OnSystemLowMemoryWhileAppInForeground:
    case OnSystemLowMemoryWhileAppInBackground:
      return 1;
    default:
      FLog.wtf(TAG, "unknown trim type: %s", trimType);
      return 0;
  }
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:21,代碼來源:BitmapMemoryCacheTrimStrategy.java

示例3: loadScript

import com.facebook.common.logging.FLog; //導入方法依賴的package包/類
/**
 * This loader delegates to (and so behaves like) the currently preferred
 * loader. If that loader fails in a recoverable way and we fall back from it,
 * it is replaced by the next most preferred loader.
 */
@Override
public String loadScript(CatalystInstanceImpl instance) {
  while (true) {
    try {
      return getDelegateLoader().loadScript(instance);
    } catch (Exception e) {
      if (!e.getMessage().startsWith(RECOVERABLE)) {
        throw e;
      }

      mLoaders.pop();
      mRecoveredErrors.add(e);
      FLog.wtf(TAG, "Falling back from recoverable error", e);
    }
  }
}
 
開發者ID:qq565999484,項目名稱:RNLearn_Project1,代碼行數:22,代碼來源:FallbackJSBundleLoader.java

示例4: decrement

import com.facebook.common.logging.FLog; //導入方法依賴的package包/類
/**
 * 'Decrement' an item from the counter
 * @param numBytes size of the item in bytes
 */
public void decrement(int numBytes) {
  if (this.mNumBytes >= numBytes && this.mCount > 0) {
    this.mCount--;
    this.mNumBytes -= numBytes;
  } else {
    FLog.wtf(
        TAG,
        "Unexpected decrement of %d. Current numBytes = %d, count = %d",
        numBytes,
        this.mNumBytes,
        this.mCount);
  }
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:18,代碼來源:BasePool.java

示例5: getTrimRatio

import com.facebook.common.logging.FLog; //導入方法依賴的package包/類
@Override
public double getTrimRatio(MemoryTrimType trimType) {
  switch (trimType) {
    case OnCloseToDalvikHeapLimit:
      // Resources cached on native heap do not consume Dalvik heap, so no trimming here.
      return 0;
    case OnAppBackgrounded:
    case OnSystemLowMemoryWhileAppInForeground:
    case OnSystemLowMemoryWhileAppInBackground:
      return 1;
    default:
      FLog.wtf(TAG, "unknown trim type: %s", trimType);
      return 0;
  }
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:16,代碼來源:NativeMemoryCacheTrimStrategy.java

示例6: onUnhandledException

import com.facebook.common.logging.FLog; //導入方法依賴的package包/類
/**
 * Called whenever onNewResultImpl or onFailureImpl throw an exception
 */
protected void onUnhandledException(Exception e) {
  FLog.wtf(this.getClass(), "unhandled exception", e);
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:7,代碼來源:BaseConsumer.java


注:本文中的com.facebook.common.logging.FLog.wtf方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。