Loading kinetic-client/src/main/java/kinetic/client/KineticClient.java +7 −3 Original line number Diff line number Diff line Loading @@ -19,6 +19,8 @@ package kinetic.client; import java.util.List; import kinetic.client.advanced.PersistOption; /** * Kinetic Client Application Interface. * <p> Loading Loading @@ -68,14 +70,16 @@ public interface KineticClient extends GenericKineticClient { /** * The flush operation flushes any outstanding PUTs or DELETEs on the * device. * device/simulator. * <p> * Currently only Kinetic drive supports this operation. This command has no * effect on the simulator. * If the call returns successfully, all PUT/DELETE operations with * SYNC/ASYNC PersistOption received by the service prior to this are * flushed to the store. * * @throws KineticException * if any internal error occurred. * * @see PersistOption */ public void flush() throws KineticException; Loading kinetic-simulator/src/main/java/com/seagate/kinetic/simulator/internal/BatchOperationHandler.java +0 −2 Original line number Diff line number Diff line Loading @@ -124,8 +124,6 @@ public class BatchOperationHandler { private synchronized void waitForBatchToFinish() { long timeout = 0; long period = 3000; Loading kinetic-simulator/src/main/java/com/seagate/kinetic/simulator/internal/handler/FlushOpHandler.java +6 −1 Original line number Diff line number Diff line Loading @@ -27,7 +27,12 @@ public class FlushOpHandler extends CommandHandlerBase implements @Override public void processRequest(KineticMessage request, KineticMessage response) throws ServiceException { ; try { super.engine.getStore().flush(); } catch (Exception e) { throw new ServiceException(e.getMessage()); } } } kinetic-simulator/src/main/java/com/seagate/kinetic/simulator/persist/Store.java +9 −1 Original line number Diff line number Diff line Loading @@ -239,4 +239,12 @@ public interface Store<K, O, V> { * @return a new instance of batch operation object. */ public BatchOperation<K, V> createBatchOperation() throws KVStoreException; /** * Flush data to store. * * @throws KVStoreException * if any internal error occurred. */ public void flush() throws KVStoreException; } kinetic-simulator/src/main/java/com/seagate/kinetic/simulator/persist/bdb/BdbStore.java +5 −0 Original line number Diff line number Diff line Loading @@ -151,4 +151,9 @@ public class BdbStore implements Store<ByteString, ByteString, KVValue> { throw new java.lang.UnsupportedOperationException(); } @Override public void flush() throws KVStoreException { logger.warning("flush is not implemented for bdb"); } } Loading
kinetic-client/src/main/java/kinetic/client/KineticClient.java +7 −3 Original line number Diff line number Diff line Loading @@ -19,6 +19,8 @@ package kinetic.client; import java.util.List; import kinetic.client.advanced.PersistOption; /** * Kinetic Client Application Interface. * <p> Loading Loading @@ -68,14 +70,16 @@ public interface KineticClient extends GenericKineticClient { /** * The flush operation flushes any outstanding PUTs or DELETEs on the * device. * device/simulator. * <p> * Currently only Kinetic drive supports this operation. This command has no * effect on the simulator. * If the call returns successfully, all PUT/DELETE operations with * SYNC/ASYNC PersistOption received by the service prior to this are * flushed to the store. * * @throws KineticException * if any internal error occurred. * * @see PersistOption */ public void flush() throws KineticException; Loading
kinetic-simulator/src/main/java/com/seagate/kinetic/simulator/internal/BatchOperationHandler.java +0 −2 Original line number Diff line number Diff line Loading @@ -124,8 +124,6 @@ public class BatchOperationHandler { private synchronized void waitForBatchToFinish() { long timeout = 0; long period = 3000; Loading
kinetic-simulator/src/main/java/com/seagate/kinetic/simulator/internal/handler/FlushOpHandler.java +6 −1 Original line number Diff line number Diff line Loading @@ -27,7 +27,12 @@ public class FlushOpHandler extends CommandHandlerBase implements @Override public void processRequest(KineticMessage request, KineticMessage response) throws ServiceException { ; try { super.engine.getStore().flush(); } catch (Exception e) { throw new ServiceException(e.getMessage()); } } }
kinetic-simulator/src/main/java/com/seagate/kinetic/simulator/persist/Store.java +9 −1 Original line number Diff line number Diff line Loading @@ -239,4 +239,12 @@ public interface Store<K, O, V> { * @return a new instance of batch operation object. */ public BatchOperation<K, V> createBatchOperation() throws KVStoreException; /** * Flush data to store. * * @throws KVStoreException * if any internal error occurred. */ public void flush() throws KVStoreException; }
kinetic-simulator/src/main/java/com/seagate/kinetic/simulator/persist/bdb/BdbStore.java +5 −0 Original line number Diff line number Diff line Loading @@ -151,4 +151,9 @@ public class BdbStore implements Store<ByteString, ByteString, KVValue> { throw new java.lang.UnsupportedOperationException(); } @Override public void flush() throws KVStoreException { logger.warning("flush is not implemented for bdb"); } }