Code example for LinkedBlockingQueue

Methods: poll

0
		public final synchronized void incrementSubCount() { 
			mCurrentSubCount += 1;
		} 
 
		public final Bundle pollAccountSyncRequest() {
			return mRequestQueue.poll();
		} 
 
		public final synchronized boolean requestAccountSync(Bundle bundle) {
			boolean flag;
			flag = mRequestQueue.isEmpty();
			if (bundle == null)
				bundle = new Bundle();
			mRequestQueue.offer(bundle);
			return flag;
		} 
 
		public final void setFullSync(boolean flag) {
			mFullSync = flag;
		}