@Override public void configure(WorkerConfig config) { super.configure(config); file = new File(config.getString(StandaloneConfig.OFFSET_STORAGE_FILE_FILENAME_CONFIG)); }
@Override public Void call() throws Exception { for (Map.Entry<ByteBuffer, ByteBuffer> entry : values.entrySet()) { data.put(entry.getKey(), entry.getValue()); } save(); if (callback != null) callback.onCompletion(null, null); return null; } });
@Override public synchronized void start() { super.start(); log.info("Starting FileOffsetBackingStore with file {}", file); load(); }
@Override public synchronized void stop() { super.stop(); // Nothing to do since this doesn't maintain any outstanding connections/data log.info("Stopped FileOffsetBackingStore"); }
workerConfig = new FileConfig(offsetBackingStoreProperties); } else if (StreamOptions.MEMORY_BACKING_STORE().getValue().equals(bs)) { offsetBackingStore = new MemoryOffsetBackingStore(); workerConfig = new MemoryConfig(offsetBackingStoreProperties); } else if (StreamOptions.KAFKA_BACKING_STORE().getValue().equals(bs)) {