Package org.apache.zookeeper

Examples of org.apache.zookeeper.CreateMode


          };
          client.updateDataSerialized(path, updater);
        }
        else
        {
          CreateMode mode = (persistent) ? CreateMode.PERSISTENT : CreateMode.EPHEMERAL;
          if (record.getDeltaList().size() > 0)
          {
            ZNRecord value = new ZNRecord(record.getId());
            value.merge(record);
            client.create(path, value, mode);
View Full Code Here


          client.asyncSetData(path, record, -1, null);
        }
      }
      else
      {
        CreateMode mode = (persistent) ? CreateMode.PERSISTENT : CreateMode.EPHEMERAL;
        if (record.getDeltaList().size() > 0)
        {
          ZNRecord newRecord = new ZNRecord(record.getId());
          newRecord.merge(record);
          client.create(path, null, mode);
View Full Code Here

          };
          client.updateDataSerialized(path, updater);
        }
        else
        {
          CreateMode mode = (persistent) ? CreateMode.PERSISTENT : CreateMode.EPHEMERAL;
          client.create(path, record, mode);
        }
        break;
      }
      catch (Exception e)
View Full Code Here

  /**
   * sync create
   */
  public RetCode create(String path, T record, List<String> pathCreated, int options)
  {
    CreateMode mode = AccessOption.getMode(options);
    if (mode == null)
    {
      LOG.error("Invalid create mode. options: " + options);
      return RetCode.ERROR;
    }
View Full Code Here

                     List<String> pathsCreated,
                     Stat setstat,
                     int expectVersion,
                     int options)
  {
    CreateMode mode = AccessOption.getMode(options);
    if (mode == null)
    {
      LOG.error("Invalid set mode. options: " + options);
      return false;
    }
View Full Code Here

                  DataUpdater<T> updater,
                  List<String> createPaths,
                  Stat stat,
                  int options)
  {
    CreateMode mode = AccessOption.getMode(options);
    if (mode == null)
    {
      LOG.error("Invalid update mode. options: " + options);
      return null;
    }
View Full Code Here

      throw new IllegalArgumentException("paths, records, needCreate, and pathsCreated should be of same size");
    }

    CreateCallbackHandler[] cbList = new CreateCallbackHandler[paths.size()];

    CreateMode mode = AccessOption.getMode(options);
    if (mode == null)
    {
      LOG.error("Invalid async set mode. options: " + options);
      return cbList;
    }
View Full Code Here

  @Override
  public boolean[] createChildren(List<String> paths, List<T> records, int options)
  {
    boolean[] success = new boolean[paths.size()];

    CreateMode mode = AccessOption.getMode(options);
    if (mode == null)
    {
      LOG.error("Invalid async create mode. options: " + options);
      return success;
    }
View Full Code Here

      throw new IllegalArgumentException("paths, records, and pathsCreated should be of same size");
    }

    boolean[] success = new boolean[paths.size()];

    CreateMode mode = AccessOption.getMode(options);
    if (mode == null)
    {
      LOG.error("Invalid async set mode. options: " + options);
      return success;
    }
View Full Code Here

    List<Stat> setStats =
        new ArrayList<Stat>(Collections.<Stat> nCopies(paths.size(), null));
    List<T> updateData = new ArrayList<T>(Collections.<T> nCopies(paths.size(), null));

    CreateMode mode = AccessOption.getMode(options);
    if (mode == null)
    {
      LOG.error("Invalid update mode. options: " + options);
      return updateData;
    }
View Full Code Here

TOP

Related Classes of org.apache.zookeeper.CreateMode

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.