/** Runnable interface implementation that compresses and writes output blocks asynchronously. */ @Override public void run() { while (true) { try { Osmformat.PrimitiveBlock block = synchronousQueue.take(); // block until work is available if (block.getPrimitivegroupCount() == 0) { break; // a block with no primitive groups tells the writer thread to shut down. } writeOneBlob(block); } catch (InterruptedException ex) { LOG.error("Block writer thread was interrupted while waiting for work."); break; } } try { downstream.flush(); downstream.close(); } catch (IOException e) { throw new RuntimeException(e); } }
return null; for (int i = 0; i < getPrimitivegroupCount(); i++) { if (!getPrimitivegroup(i).isInitialized()) { return null;
/** * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code> */ @java.lang.Override public int getPrimitivegroupCount() { return instance.getPrimitivegroupCount(); }/** * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>