public void acquireReference() { refCount = Math.incrementExact( refCount ); }
synchronized void mark() { marked = Math.incrementExact( marked ); }
void incrementRequests() { requests = Math.incrementExact( requests ); }
private void registerReadLockAcquired( Object tx, TxLockElement tle ) { registerLockAcquired( tx, tle ); totalReadCount = Math.incrementExact( totalReadCount ); tle.readCount = Math.incrementExact( tle.readCount ); }
private void registerWriteLockAcquired( Object tx, TxLockElement tle ) { registerLockAcquired( tx, tle ); totalWriteCount = Math.incrementExact( totalWriteCount ); tle.writeCount = Math.incrementExact( tle.writeCount ); }
private int incrementActiveClients( int clientState ) { return getStatus( clientState ) | Math.incrementExact( getActiveClients( clientState ) ); }
synchronized void mark() { marked = Math.incrementExact( marked ); }
void incrementRequests() { requests = Math.incrementExact( requests ); }
public void acquireReference() { refCount = Math.incrementExact( refCount ); }
public void incrementTruePositives() { truePositives = Math.incrementExact(truePositives); }
public void incrementFalsePositives() { falsePositives = Math.incrementExact(falsePositives); }
public void incrementTrueNegatives() { trueNegatives = Math.incrementExact(trueNegatives); }
public void incrementFalseNegatives() { falseNegatives = Math.incrementExact(falseNegatives); }
/** * Adds an edge to the Markov chain of the specified class, increasing the probability of * transitioning between the given nodes of the given class. * * @param i1 The index of the source node to transition from. * @param i2 The index of the destination node to transition to. * @param classA true if this transition should be added to class A's chain; false to add this * transition to class B's chain. * @return The builder, for chaining. */ public BinaryMarkovBuilder addEdge(int i1, int i2, boolean classA) { int[][] transitionCounts = classA ? transitionCountsA : transitionCountsB; // transitionCounts[i1][i2]++ with an exception upon integer overflow transitionCounts[i1][i2] = Math.incrementExact(transitionCounts[i1][i2]); return this; }
a = 2147483647; a = Math.incrementExact(a); System.out.println(a);
private void registerReadLockAcquired( Object tx, TxLockElement tle ) { registerLockAcquired( tx, tle ); totalReadCount = Math.incrementExact( totalReadCount ); tle.readCount = Math.incrementExact( tle.readCount ); }
private void registerWriteLockAcquired( Object tx, TxLockElement tle ) { registerLockAcquired( tx, tle ); totalWriteCount = Math.incrementExact( totalWriteCount ); tle.writeCount = Math.incrementExact( tle.writeCount ); }
private void touch(Object domainObj, Class<? extends Annotation> annotation) { Field f = BeanUtils.findFieldWithAnnotation(domainObj, annotation); if (f == null) return; Object version = BeanUtils.getFieldWithAnnotation(domainObj, annotation); if (f.getType().isAssignableFrom(Integer.class)) { version = Math.incrementExact((Integer)version); } else if (f.getType().isAssignableFrom(Long.class)) { version = Math.incrementExact((Long)version); } BeanUtils.setFieldWithAnnotation(domainObj, annotation, version); } }
@Override public void doWrite() { int i = 0; for (String s : termSet) { byte[] termBytes = s.getBytes(StandardCharsets.UTF_8); byte[] indexBytes = ByteBuffer.allocate(4).putInt(i).array(); try { terms.put(indexBytes, termBytes); indices.put(termBytes, indexBytes); } catch (RocksDBException e) { throw new RuntimeException(e); } i = Math.incrementExact(i); } }
private int incrementActiveClients( int clientState ) { return getStatus( clientState ) | Math.incrementExact( getActiveClients( clientState ) ); }