Tabnine Logo
LockServerOptions.isStandaloneServer
Code IndexAdd Tabnine to your IDE (free)

How to use
isStandaloneServer
method
in
com.palantir.lock.LockServerOptions

Best Java code snippets using com.palantir.lock.LockServerOptions.isStandaloneServer (Showing top 10 results out of 315)

origin: palantir/atlasdb

@Override
public String toString() {
  return MoreObjects.toStringHelper(getClass().getSimpleName())
      .add("isStandaloneServer", isStandaloneServer())
      .add("maxAllowedLockTimeout", getMaxAllowedLockTimeout())
      .add("maxAllowedClockDrift", getMaxAllowedClockDrift())
      .add("maxAllowedBlockingDuration", getMaxAllowedBlockingDuration())
      .add("maxNormalLockAge", getMaxNormalLockAge())
      .add("randomBitCount", getRandomBitCount())
      .add("lockStateLoggerDir", getLockStateLoggerDir())
      .add("slowLogTriggerMillis", slowLogTriggerMillis())
      .toString();
}
origin: palantir/atlasdb

@Override
public boolean equals(@Nullable Object obj) {
  if (this == obj) {
    return true;
  }
  if (!(obj instanceof LockServerOptions)) {
    return false;
  }
  LockServerOptions other = (LockServerOptions) obj;
  return Objects.equal(isStandaloneServer(), other.isStandaloneServer())
      && Objects.equal(getMaxAllowedLockTimeout(), other.getMaxAllowedLockTimeout())
      && Objects.equal(getMaxAllowedClockDrift(), other.getMaxAllowedClockDrift())
      && Objects.equal(getMaxAllowedBlockingDuration(), other.getMaxAllowedBlockingDuration())
      && Objects.equal(getMaxNormalLockAge(), other.getMaxNormalLockAge())
      && Objects.equal(getRandomBitCount(), other.getRandomBitCount())
      && Objects.equal(getLockStateLoggerDir(), other.getLockStateLoggerDir())
      && Objects.equal(slowLogTriggerMillis(), other.slowLogTriggerMillis());
}
origin: palantir/atlasdb

private LockServiceImpl(LockServerOptions options, Runnable callOnClose) {
  Preconditions.checkNotNull(options);
  this.callOnClose = callOnClose;
  isStandaloneServer = options.isStandaloneServer();
  maxAllowedLockTimeout = SimpleTimeDuration.of(options.getMaxAllowedLockTimeout());
  maxAllowedClockDrift = SimpleTimeDuration.of(options.getMaxAllowedClockDrift());
  maxNormalLockAge = SimpleTimeDuration.of(options.getMaxNormalLockAge());
  lockStateLoggerDir = options.getLockStateLoggerDir();
  slowLogTriggerMillis = options.slowLogTriggerMillis();
  executor.execute(() -> {
    Thread.currentThread().setName("Held Locks Token Reaper");
    reapLocks(lockTokenReaperQueue, heldLocksTokenMap);
  });
  executor.execute(() -> {
    Thread.currentThread().setName("Held Locks Grant Reaper");
    reapLocks(lockGrantReaperQueue, heldLocksGrantMap);
  });
}
origin: palantir/atlasdb

@Override
public int hashCode() {
  return Objects.hashCode(isStandaloneServer(),
      getMaxAllowedLockTimeout(),
      getMaxAllowedClockDrift(),
      getMaxAllowedBlockingDuration(),
      getMaxNormalLockAge(),
      getRandomBitCount(),
      getLockStateLoggerDir(),
      slowLogTriggerMillis());
}
origin: palantir/atlasdb

@Test
public void testSerialisationAndDeserialisationOfLockServerOptions() throws Exception {
  LockServerOptions lockServerOptions = LockServerOptions.builder()
      .isStandaloneServer(false)
      .slowLogTriggerMillis(10L)
      .build();
  ObjectMapper mapper = new ObjectMapper();
  String serializedForm = mapper.writeValueAsString(lockServerOptions);
  LockServerOptions deserialzedlockServerOptions = mapper.readValue(serializedForm, LockServerOptions.class);
  assertEquals(lockServerOptions, deserialzedlockServerOptions);
  assertEquals(false, deserialzedlockServerOptions.isStandaloneServer());
  assertEquals(10L, deserialzedlockServerOptions.slowLogTriggerMillis());
}
origin: palantir/atlasdb

SerializationProxy(LockServerOptions lockServerOptions) {
  isStandaloneServer = lockServerOptions.isStandaloneServer();
  maxAllowedLockTimeout = SimpleTimeDuration.of(
      lockServerOptions.getMaxAllowedLockTimeout());
  maxAllowedClockDrift = SimpleTimeDuration.of(
      lockServerOptions.getMaxAllowedClockDrift());
  maxAllowedBlockingDuration = SimpleTimeDuration.of(
      lockServerOptions.getMaxAllowedBlockingDuration());
  maxNormalLockAge = SimpleTimeDuration.of(
      lockServerOptions.getMaxNormalLockAge());
  randomBitCount = lockServerOptions.getRandomBitCount();
  lockStateLoggerDir = lockServerOptions.getLockStateLoggerDir();
  slowLogTriggerMillis = lockServerOptions.slowLogTriggerMillis();
}
origin: com.palantir.atlasdb/lock-api

@Override
public String toString() {
  return MoreObjects.toStringHelper(getClass().getSimpleName())
      .add("isStandaloneServer", isStandaloneServer())
      .add("maxAllowedLockTimeout", getMaxAllowedLockTimeout())
      .add("maxAllowedClockDrift", getMaxAllowedClockDrift())
      .add("maxAllowedBlockingDuration", getMaxAllowedBlockingDuration())
      .add("maxNormalLockAge", getMaxNormalLockAge())
      .add("randomBitCount", getRandomBitCount())
      .add("lockStateLoggerDir", getLockStateLoggerDir())
      .add("slowLogTriggerMillis", slowLogTriggerMillis())
      .toString();
}
origin: com.palantir.atlasdb/lock-api

@Override
public boolean equals(@Nullable Object obj) {
  if (this == obj) {
    return true;
  }
  if (!(obj instanceof LockServerOptions)) {
    return false;
  }
  LockServerOptions other = (LockServerOptions) obj;
  return Objects.equal(isStandaloneServer(), other.isStandaloneServer())
      && Objects.equal(getMaxAllowedLockTimeout(), other.getMaxAllowedLockTimeout())
      && Objects.equal(getMaxAllowedClockDrift(), other.getMaxAllowedClockDrift())
      && Objects.equal(getMaxAllowedBlockingDuration(), other.getMaxAllowedBlockingDuration())
      && Objects.equal(getMaxNormalLockAge(), other.getMaxNormalLockAge())
      && Objects.equal(getRandomBitCount(), other.getRandomBitCount())
      && Objects.equal(getLockStateLoggerDir(), other.getLockStateLoggerDir())
      && Objects.equal(slowLogTriggerMillis(), other.slowLogTriggerMillis());
}
origin: com.palantir.atlasdb/lock-api

@Override
public int hashCode() {
  return Objects.hashCode(isStandaloneServer(),
      getMaxAllowedLockTimeout(),
      getMaxAllowedClockDrift(),
      getMaxAllowedBlockingDuration(),
      getMaxNormalLockAge(),
      getRandomBitCount(),
      getLockStateLoggerDir(),
      slowLogTriggerMillis());
}
origin: com.palantir.atlasdb/lock-api

SerializationProxy(LockServerOptions lockServerOptions) {
  isStandaloneServer = lockServerOptions.isStandaloneServer();
  maxAllowedLockTimeout = SimpleTimeDuration.of(
      lockServerOptions.getMaxAllowedLockTimeout());
  maxAllowedClockDrift = SimpleTimeDuration.of(
      lockServerOptions.getMaxAllowedClockDrift());
  maxAllowedBlockingDuration = SimpleTimeDuration.of(
      lockServerOptions.getMaxAllowedBlockingDuration());
  maxNormalLockAge = SimpleTimeDuration.of(
      lockServerOptions.getMaxNormalLockAge());
  randomBitCount = lockServerOptions.getRandomBitCount();
  lockStateLoggerDir = lockServerOptions.getLockStateLoggerDir();
  slowLogTriggerMillis = lockServerOptions.slowLogTriggerMillis();
}
com.palantir.lockLockServerOptionsisStandaloneServer

Javadoc

Returns true if this is a standalone lock server or false if the lock server code is running in-process with the only client accessing it.

Popular methods of LockServerOptions

  • builder
  • slowLogTriggerMillis
    Warn level logging for any lock request that receives a response after given time. If the duration i
  • getLockStateLoggerDir
  • getMaxAllowedBlockingDuration
    Returns the maximum amount of time that may be passed to LockRequest.Builder#blockForAtMost(TimeDura
  • getMaxAllowedClockDrift
    Returns the maximum permitted clock drift between the server and any client. The default value is 5
  • getMaxAllowedLockTimeout
    Returns the maximum amount of time that can be passed to LockRequest.Builder#timeoutAfter(TimeDurati
  • getMaxNormalLockAge
    Returns the maximum amount of time a lock is usually held for. The default value is 1 hour.
  • getRandomBitCount
    Returns the number of bits used to create random lock token IDs. The default value is 64 bits.

Popular in Java

  • Creating JSON documents from java classes using gson
  • setRequestProperty (URLConnection)
  • onCreateOptionsMenu (Activity)
  • getSystemService (Context)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • Top plugins for Android Studio
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