Code example for ConcurrentLinkedQueue

Methods: offer, size

0
			} 
			return i;
		} 
 
		public void restore(TileGenerator tileGenerator) {
			if (mPool.size() < mMaxSize && mPool.offer(tileGenerator)) {
				return; 
			} 
			// pool is too big or returning to pool failed, so just try to clean 
			// up. 
			tileGenerator.cleanUp();
		} 
	} 
 
	public class TileGenerator { 
		private Bitmap mBitmap;
		private SVG mSvg;
		private ByteArrayOutputStream mStream;
 
		public TileGenerator() { 
			mBitmap = Bitmap.createBitmap(mDimension, mDimension, Bitmap.Config.ARGB_8888);