Package org.apache.curator.x.rpc.connections

Examples of org.apache.curator.x.rpc.connections.Closer


            if ( !lock.acquire(maxWaitMs, TimeUnit.MILLISECONDS) )
            {
                return new OptionalLockProjection();
            }

            Closer closer = new Closer()
            {
                @Override
                public void close()
                {
                    if ( lock.isAcquiredInThisProcess() )
View Full Code Here


            CuratorEntry entry = CuratorEntry.mustGetEntry(connectionManager, projection);

            final LeaderLatch leaderLatch = new LeaderLatch(entry.getClient(), path, participantId);
            leaderLatch.start();

            Closer closer = new Closer()
            {
                @Override
                public void close()
                {
                    try
View Full Code Here

            final CuratorEntry entry = CuratorEntry.mustGetEntry(connectionManager, projection);

            final PathChildrenCache cache = new PathChildrenCache(entry.getClient(), path, cacheData, dataIsCompressed, ThreadUtils.newThreadFactory("PathChildrenCacheResource"));
            cache.start(PathChildrenCache.StartMode.valueOf(startMode.name()));

            Closer closer = new Closer()
            {
                @Override
                public void close()
                {
                    try
View Full Code Here

            final CuratorEntry entry = CuratorEntry.mustGetEntry(connectionManager, projection);

            final NodeCache cache = new NodeCache(entry.getClient(), path, dataIsCompressed);
            cache.start(buildInitial);

            Closer closer = new Closer()
            {
                @Override
                public void close()
                {
                    try
View Full Code Here

            CuratorEntry entry = CuratorEntry.mustGetEntry(connectionManager, projection);

            final PersistentEphemeralNode node = new PersistentEphemeralNode(entry.getClient(), PersistentEphemeralNode.Mode.valueOf(mode.name()), path, data);
            node.start();

            Closer closer = new Closer()
            {
                @Override
                public void close()
                {
                    try
View Full Code Here

            }

            List<LeaseProjection> leaseProjections = Lists.newArrayList();
            for ( final Lease lease : leases )
            {
                Closer closer = new Closer()
                {
                    @Override
                    public void close()
                    {
                        try
View Full Code Here

                .client(entry.getClient())
                .thisInstance((yourInstance != null) ? yourInstance.toReal() : null)
                .build();
            serviceDiscovery.start();

            Closer closer = new Closer()
            {
                @Override
                public void close()
                {
                    try
View Full Code Here

            .serviceName(serviceName)
            .build();
        try
        {
            serviceProvider.start();
            Closer closer = new Closer()
            {
                @Override
                public void close()
                {
                    try
View Full Code Here

TOP

Related Classes of org.apache.curator.x.rpc.connections.Closer

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.