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

  • Running tasks concurrently on multiple threads
  • addToBackStack (FragmentTransaction)
  • getSystemService (Context)
  • getSharedPreferences (Context)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • Permission (java.security)
    Legacy security code; do not use.
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • JTextField (javax.swing)
  • Top 25 Plugins for Webstorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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