Message.java

  1. package com.birbit.android.jobqueue.messaging;

  2. abstract public class Message {
  3.     public final Type type;
  4.     // used by the pool
  5.     Message next;
  6.     public long readyNs = Long.MIN_VALUE;

  7.     protected Message(Type type) {
  8.         this.type = type;
  9.     }

  10.     abstract protected void onRecycled();

  11.     final void recycle() {
  12.         next = null;
  13.         readyNs = Long.MIN_VALUE;
  14.         onRecycled();
  15.     }
  16. }