Commit 518f0509 authored by Ignacio Corderi's avatar Ignacio Corderi
Browse files

Added Flush command

parent 0fa9bfb5
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -177,3 +177,7 @@ class BaseAsync(Client):
    def getKeyRangeAsync(self, onSuccess, onError, *args, **kwargs):
        return self._processAsync(operations.GetKeyRange, onSuccess, onError, *args, **kwargs)

    def flushAsync(self, onSuccess, onError, *args, **kwargs):
        self._processAsync(operations.Flush, onSuccess, onError, *args, **kwargs)

+3 −0
Original line number Diff line number Diff line
@@ -73,6 +73,9 @@ class Client(BaseClient):
    def pipedPush(self, *args, **kwargs):
        return self._process(operations.P2pPipedPush, *args, **kwargs)

    def flush(self, *args, **kwargs):
        return self._process(operations.Flush, *args, **kwargs)

class KineticRangeIter(object):

    def __init__(self, client, startKey, endKey, startKeyInclusive,endKeyInclusive, prefetch):
+19 −0
Original line number Diff line number Diff line
@@ -323,6 +323,25 @@ class PushKeys(object):
    def onError(e):
        raise e

class Flush(object):

    @staticmethod
    def build(types):
        m = messages.Message()
        m.command.header.messageType = messages.Message.FLUSHALLDATA

        return (m, None)

    @staticmethod
    def parse(m, value):
        Entry.fromResponse(m, value)
        return None


    @staticmethod
    def onError(e):
        raise e


### Admin Operations ###