Package org.apache.curator.x.rpc.idl.exceptions

Examples of org.apache.curator.x.rpc.idl.exceptions.RpcException


    public static CuratorEntry mustGetEntry(ConnectionManager connectionManager, CuratorProjection projection) throws RpcException
    {
        CuratorEntry entry = connectionManager.get(projection.id);
        if ( entry == null )
        {
            throw new RpcException(ExceptionType.GENERAL, null, null, "No CuratorProjection found with the id: " + projection.id);
        }
        return entry;
    }
View Full Code Here


    public CuratorProjection newCuratorProjection(String connectionName) throws RpcException
    {
        CuratorFramework client = connectionManager.newConnection(connectionName);
        if ( client == null )
        {
            throw new RpcException(ExceptionType.GENERAL, null, null, "No connection configuration was found with the name: " + connectionName);
        }

        String id = CuratorEntry.newId();
        client.start();
        connectionManager.add(id, client);
View Full Code Here

            Object path = castBuilder(builder, PathAndBytesable.class).forPath(spec.path, spec.data);
            return new OptionalPath((path != null) ? String.valueOf(path) : null);
        }
        catch ( Exception e )
        {
            throw new RpcException(e);
        }
    }
View Full Code Here

            castBuilder(builder, Pathable.class).forPath(spec.path);
        }
        catch ( Exception e )
        {
            throw new RpcException(e);
        }
    }
View Full Code Here

            byte[] bytes = (byte[])castBuilder(builder, Pathable.class).forPath(spec.path);
            return new OptionalData(bytes);
        }
        catch ( Exception e )
        {
            throw new RpcException(e);
        }
    }
View Full Code Here

            Stat stat = (Stat)castBuilder(builder, PathAndBytesable.class).forPath(spec.path, spec.data);
            return new OptionalRpcStat(RpcCuratorEvent.toRpcStat(stat));
        }
        catch ( Exception e )
        {
            throw new RpcException(e);
        }
    }
View Full Code Here

            Stat stat = (Stat)castBuilder(builder, Pathable.class).forPath(spec.path);
            return new OptionalRpcStat((stat != null) ? RpcCuratorEvent.toRpcStat(stat) : null);
        }
        catch ( Exception e )
        {
            throw new RpcException(e);
        }
    }
View Full Code Here

            List<String> children = (List<String>)castBuilder(builder, Pathable.class).forPath(spec.path);
            return new OptionalChildrenList(children);
        }
        catch ( Exception e )
        {
            throw new RpcException(e);
        }
    }
View Full Code Here

            BackgroundCallback backgroundCallback = new RpcBackgroundCallback(this, projection);
            entry.getClient().sync().inBackground(backgroundCallback, asyncContext).forPath(path);
        }
        catch ( Exception e )
        {
            throw new RpcException(e);
        }
    }
View Full Code Here

                return entry.closeThing(id);
            }
        }
        catch ( Exception e )
        {
            throw new RpcException(e);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.curator.x.rpc.idl.exceptions.RpcException

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.