Tabnine Logo
DistributedMap.put
Code IndexAdd Tabnine to your IDE (free)

How to use
put
method
in
com.oath.micro.server.distributed.DistributedMap

Best Java code snippets using com.oath.micro.server.distributed.DistributedMap.put (Showing top 6 results out of 315)

origin: aol/micro-server

  @GET
  @Path("/put")
  public String put() {
    client.put("hello", "world");
    return "added";
  }
}
origin: aol/micro-server

  @GET
  @Path("/put")
  public String put() {
    client.put("hello", "world");
    return "added";
  }
}
origin: aol/micro-server

  @GET
  @Path("/put")
  public String put() {
    client.put("hello", "world");
    return "added";
  }
}
origin: aol/micro-server

  @GET
  @Path("/put")
  public String put() {
    client.put("hello", "world");
    return "added";
  }
}
origin: aol/micro-server

  @GET
  @Path("/put")
  public String put() {
    client.put("hello", "world");
    return "added";
  }
}
origin: aol/micro-server

/**
 * Save provided data with the key this ManifestComparator manages bump the
 * versioned key version.
 * 
 * NB : To avoid race conditions - make sure only one service (an elected
 * leader) can write at a time (see micro-mysql for a mysql distributed
 * lock, or micro-curator for a curator / zookeeper distributed lock
 * implementation).
 * 
 * @param data
 *            to save
 */
@Override
public void saveAndIncrement(T data) {
  Either<Void, T> oldData = this.data;
  VersionedKey newVersionedKey = increment();
  logger.info("Saving data with key {}, new version is {}", key, newVersionedKey.toJson());
  connection.put(newVersionedKey.toJson(), new Data(
                           data, new Date(), newVersionedKey.toJson()));
  connection.put(key, newVersionedKey.toJson());
  try {
    this.data = Either.right(data);
    delete(versionedKey);
  } catch (Throwable t) {
    this.data = oldData;
  } finally {
    versionedKey = newVersionedKey.toJson();
  }
}
com.oath.micro.server.distributedDistributedMapput

Popular methods of DistributedMap

  • get
  • delete

Popular in Java

  • Finding current android device location
  • getSystemService (Context)
  • getContentResolver (Context)
  • setContentView (Activity)
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • BoxLayout (javax.swing)
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now