Package com.bazaarvoice.curator.recipes

Examples of com.bazaarvoice.curator.recipes.PersistentEphemeralNode$Sync


        byte[] data = ServiceEndPointJsonCodec.toJson(endPoint, registrationData).getBytes(Charsets.UTF_8);
        checkState(data.length < MAX_DATA_SIZE, "Serialized form of ServiceEndPoint must be < 1MB.");

        String path = makeEndPointPath(endPoint);
        PersistentEphemeralNode oldNode = _nodes.put(path, _nodeFactory.create(path, data));
        if (oldNode != null) {
            closeNode(oldNode);
        }

        String serviceName = endPoint.getServiceName();
View Full Code Here


    public void unregister(ServiceEndPoint endPoint) {
        checkState(!_closed);
        checkNotNull(endPoint);

        String path = makeEndPointPath(endPoint);
        PersistentEphemeralNode node = _nodes.remove(path);
        if (node != null) {
            closeNode(node);

            String serviceName = endPoint.getServiceName();
            _numRegisteredEndpoints.getUnchecked(serviceName).dec();
View Full Code Here

        NodeFactory(CuratorFramework curator) {
            _curator = checkNotNull(curator);
        }

        PersistentEphemeralNode create(String path, byte[] data) {
            return new PersistentEphemeralNode(_curator, path, data, CreateMode.EPHEMERAL);
        }
View Full Code Here

        byte[] data = ServiceEndPointJsonCodec.toJson(endPoint, registrationData).getBytes(Charsets.UTF_8);
        checkState(data.length < MAX_DATA_SIZE, "Serialized form of ServiceEndPoint must be < 1MB.");

        String path = makeEndPointPath(endPoint);
        PersistentEphemeralNode oldNode = _nodes.put(path, _nodeFactory.create(path, data));
        if (oldNode != null) {
            closeNode(oldNode);
        }

        String serviceName = endPoint.getServiceName();
View Full Code Here

    public void unregister(ServiceEndPoint endPoint) {
        checkState(!_closed);
        checkNotNull(endPoint);

        String path = makeEndPointPath(endPoint);
        PersistentEphemeralNode node = _nodes.remove(path);
        if (node != null) {
            closeNode(node);

            String serviceName = endPoint.getServiceName();
            _numRegisteredEndpoints.getUnchecked(serviceName).dec();
View Full Code Here

        NodeFactory(CuratorFramework curator) {
            _curator = checkNotNull(curator);
        }

        PersistentEphemeralNode create(String path, byte[] data) {
            return new PersistentEphemeralNode(_curator, path, data, CreateMode.EPHEMERAL);
        }
View Full Code Here

        byte[] data = ServiceEndPointJsonCodec.toJson(endPoint, registrationData).getBytes(Charsets.UTF_8);
        checkState(data.length < MAX_DATA_SIZE, "Serialized form of ServiceEndPoint must be < 1MB.");

        String path = makeEndPointPath(endPoint);
        PersistentEphemeralNode oldNode = _nodes.put(path, _nodeFactory.create(path, data));
        if (oldNode != null) {
            closeNode(oldNode);
        }

        String serviceName = endPoint.getServiceName();
View Full Code Here

    public void unregister(ServiceEndPoint endPoint) {
        checkState(!_closed);
        checkNotNull(endPoint);

        String path = makeEndPointPath(endPoint);
        PersistentEphemeralNode node = _nodes.remove(path);
        if (node != null) {
            closeNode(node);

            String serviceName = endPoint.getServiceName();
            _numRegisteredEndpoints.getUnchecked(serviceName).dec();
View Full Code Here

        NodeFactory(CuratorFramework curator) {
            _curator = checkNotNull(curator);
        }

        PersistentEphemeralNode create(String path, byte[] data) {
            return new PersistentEphemeralNode(_curator, path, data, CreateMode.EPHEMERAL);
        }
View Full Code Here

TOP

Related Classes of com.bazaarvoice.curator.recipes.PersistentEphemeralNode$Sync

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.