Ejemplo n.º 1
0
    def write(self, name, **kwargs):
        """
        Exposes the write API for every replica server and is the second of
        the two  primary methods of replica interaction.

        the write method exepcts the name of the object to write to and
        creates a Write event with meta informationa bout the write. It is
        the responsibility of sublcasses to perform the actual write on their
        local stores with replication.

        Note that name can also be a Write event and this method is in very
        different than the old write method (see details in read).

        This method will be adapted in the future to deal with write sizes,
        blocks, and other write meta information.
        """
        if not name:
            raise AccessError(
                "Must supply a name to write to the replica server")

        return Write.create(name, self, **kwargs)
Ejemplo n.º 2
0
    def write(self, name, **kwargs):
        """
        Exposes the write API for every replica server and is the second of
        the two  primary methods of replica interaction.

        the write method exepcts the name of the object to write to and
        creates a Write event with meta informationa bout the write. It is
        the responsibility of sublcasses to perform the actual write on their
        local stores with replication.

        Note that name can also be a Write event and this method is in very
        different than the old write method (see details in read).

        This method will be adapted in the future to deal with write sizes,
        blocks, and other write meta information.
        """
        if not name:
            raise AccessError(
                "Must supply a name to write to the replica server"
            )

        return Write.create(name, self, **kwargs)