Codota Logo
ByteBufferUtil.toInt
Code IndexAdd Codota to your IDE (free)

How to use
toInt
method
in
org.apache.cassandra.utils.ByteBufferUtil

Best Java code snippets using org.apache.cassandra.utils.ByteBufferUtil.toInt (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Charset c =
  • Codota IconString charsetName;Charset.forName(charsetName)
  • Codota IconCharset.defaultCharset()
  • Codota IconContentType contentType;contentType.getCharset()
  • Smart code suggestions by Codota
}
origin: Impetus/Kundera

  /**
   * Decompose.
   * 
   * @param value
   *            the value
   * @param clazz
   *            the clazz
   * @return the object
   */
  private static Object decompose(Object value, Class clazz)
  {
    ByteBuffer buf = ByteBuffer.wrap((byte[]) value, 0, ((byte[]) value).length);
    return ByteBufferUtil.toInt(buf);
  }
}
origin: Impetus/Kundera

if (columnName.equals("ttl(PERSON_NAME)"))
  Assert.assertEquals(5, ByteBufferUtil.toInt(ByteBuffer.wrap(column.getValue())));
  personNameFound = true;
  Assert.assertEquals(5, ByteBufferUtil.toInt(ByteBuffer.wrap(column.getValue())));
  ageFound = true;
if (columnName.equals("ttl(PERSON_NAME)"))
  Assert.assertEquals(10, ByteBufferUtil.toInt(ByteBuffer.wrap(column.getValue())));
  personNameFound = true;
if (columnName.equals("ttl(PERSON_NAME)"))
  Assert.assertEquals(10, ByteBufferUtil.toInt(ByteBuffer.wrap(column.getValue())));
  personNameFound = true;
  Assert.assertEquals(10, ByteBufferUtil.toInt(ByteBuffer.wrap(column.getValue())));
  ageFound = true;
if (columnName.equals("ttl(PERSON_NAME)"))
  Assert.assertEquals(10, ByteBufferUtil.toInt(ByteBuffer.wrap(column.getValue())));
  personNameFound = true;
  Assert.assertEquals(10, ByteBufferUtil.toInt(ByteBuffer.wrap(column.getValue())));
  ageFound = true;
origin: com.impetus.client/kundera-cassandra

  private static Object decompose(Object value, Class clazz)
  {
    ByteBuffer buf = ByteBuffer.wrap((byte[]) value, 0, ((byte[]) value).length);
    return ByteBufferUtil.toInt(buf);
  }
}
origin: org.apache.cassandra/cassandra-clientutil

public Integer deserialize(ByteBuffer bytes)
{
  return bytes.remaining() == 0 ? null : ByteBufferUtil.toInt(bytes);
}
origin: Impetus/Kundera

Assert.assertEquals(BytesType.class.getName(), Boolean.getBoolean(ByteBufferUtil.string(ByteBuffer.wrap(cqlRow.getColumns().get(10).getValue()))));
Assert.assertEquals("max_compaction_threshold", ByteBufferUtil.string(ByteBuffer.wrap(cqlRow.getColumns().get(17).getName())));
Assert.assertEquals(16, ByteBufferUtil.toInt(ByteBuffer.wrap(cqlRow.getColumns().get(17).getValue())));
Assert.assertEquals("min_compaction_threshold", ByteBufferUtil.string(ByteBuffer.wrap(cqlRow.getColumns().get(18).getName())));
Assert.assertEquals(64, ByteBufferUtil.toInt(ByteBuffer.wrap(cqlRow.getColumns().get(18).getValue())));
Assert.assertEquals("replicate_on_write", ByteBufferUtil.string(ByteBuffer.wrap(cqlRow.getColumns().get(21).getName())));
Assert.assertEquals("true", ByteBufferUtil.string(ByteBuffer.wrap(cqlRow.getColumns().get(21).getValue())));
Assert.assertEquals(BytesType.class.getName(), Boolean.getBoolean(ByteBufferUtil.string(ByteBuffer.wrap(cqlRow.getColumns().get(10).getValue()))));
Assert.assertEquals("max_compaction_threshold", ByteBufferUtil.string(ByteBuffer.wrap(cqlRow.getColumns().get(17).getName())));
Assert.assertEquals(4, ByteBufferUtil.toInt(ByteBuffer.wrap(cqlRow.getColumns().get(17).getValue())));
Assert.assertEquals("min_compaction_threshold", ByteBufferUtil.string(ByteBuffer.wrap(cqlRow.getColumns().get(18).getName())));
Assert.assertEquals(32, ByteBufferUtil.toInt(ByteBuffer.wrap(cqlRow.getColumns().get(18).getValue())));
Assert.assertEquals("replicate_on_write", ByteBufferUtil.string(ByteBuffer.wrap(cqlRow.getColumns().get(21).getName())));
Assert.assertEquals("true", ByteBufferUtil.string(ByteBuffer.wrap(cqlRow.getColumns().get(21).getValue())));
Assert.assertEquals(BytesType.class.getName(), Boolean.getBoolean(ByteBufferUtil.string(ByteBuffer.wrap(cqlRow.getColumns().get(10).getValue()))));
Assert.assertEquals("max_compaction_threshold", ByteBufferUtil.string(ByteBuffer.wrap(cqlRow.getColumns().get(17).getName())));
Assert.assertEquals(16, ByteBufferUtil.toInt(ByteBuffer.wrap(cqlRow.getColumns().get(17).getValue())));
Assert.assertEquals("min_compaction_threshold", ByteBufferUtil.string(ByteBuffer.wrap(cqlRow.getColumns().get(18).getName())));
Assert.assertEquals(64, ByteBufferUtil.toInt(ByteBuffer.wrap(cqlRow.getColumns().get(18).getValue())));
Assert.assertEquals("replicate_on_write", ByteBufferUtil.string(ByteBuffer.wrap(cqlRow.getColumns().get(21).getName())));
Assert.assertEquals("true", ByteBufferUtil.string(ByteBuffer.wrap(cqlRow.getColumns().get(21).getValue())));
Assert.assertEquals(BytesType.class.getName(), Boolean.getBoolean(ByteBufferUtil.string(ByteBuffer.wrap(cqlRow.getColumns().get(10).getValue()))));
Assert.assertEquals("max_compaction_threshold", ByteBufferUtil.string(ByteBuffer.wrap(cqlRow.getColumns().get(17).getName())));
Assert.assertEquals(16, ByteBufferUtil.toInt(ByteBuffer.wrap(cqlRow.getColumns().get(17).getValue())));
Assert.assertEquals("min_compaction_threshold", ByteBufferUtil.string(ByteBuffer.wrap(cqlRow.getColumns().get(18).getName())));
Assert.assertEquals(64, ByteBufferUtil.toInt(ByteBuffer.wrap(cqlRow.getColumns().get(18).getValue())));
origin: com.netflix.sstableadaptor/sstable-adaptor-cassandra

public Integer deserialize(ByteBuffer bytes)
{
  return bytes.remaining() == 0 ? null : ByteBufferUtil.toInt(bytes);
}
origin: org.apache.cassandra/cassandra-all

public Integer deserialize(ByteBuffer bytes)
{
  return bytes.remaining() == 0 ? null : ByteBufferUtil.toInt(bytes);
}
origin: org.apache.cassandra/cassandra-all

public Integer deserialize(ByteBuffer bytes)
{
  return bytes.remaining() == 0 ? null : ByteBufferUtil.toInt(bytes);
}
origin: jsevellec/cassandra-unit

public Integer deserialize(ByteBuffer bytes)
{
  return bytes.remaining() == 0 ? null : ByteBufferUtil.toInt(bytes);
}
origin: jsevellec/cassandra-unit

public Integer deserialize(ByteBuffer bytes)
{
  return bytes.remaining() == 0 ? null : ByteBufferUtil.toInt(bytes);
}
origin: org.apache.cassandra/cassandra-clientutil

public Integer deserialize(ByteBuffer bytes)
{
  return bytes.remaining() == 0 ? null : ByteBufferUtil.toInt(bytes);
}
origin: com.facebook.presto.cassandra/cassandra-server

public Integer deserialize(ByteBuffer bytes)
{
  return bytes.remaining() == 0 ? null : ByteBufferUtil.toInt(bytes);
}
origin: jsevellec/cassandra-unit

static int getListIndex(ByteBuffer collectionElement) throws InvalidRequestException
{
  int idx = ByteBufferUtil.toInt(collectionElement);
  if (idx < 0)
    throw new InvalidRequestException(String.format("Invalid negative list index %d", idx));
  return idx;
}
origin: jsevellec/cassandra-unit

public long toTimeInMillis(ByteBuffer buffer) throws MarshalException
{
  return SimpleDateSerializer.dayToTimeInMillis(ByteBufferUtil.toInt(buffer));
}
origin: com.strapdata.cassandra/cassandra-all

static int getListIndex(ByteBuffer collectionElement) throws InvalidRequestException
{
  int idx = ByteBufferUtil.toInt(collectionElement);
  if (idx < 0)
    throw new InvalidRequestException(String.format("Invalid negative list index %d", idx));
  return idx;
}
origin: com.facebook.presto.cassandra/cassandra-server

static int getListIndex(ByteBuffer collectionElement) throws InvalidRequestException
{
  int idx = ByteBufferUtil.toInt(collectionElement);
  if (idx < 0)
    throw new InvalidRequestException(String.format("Invalid negative list index %d", idx));
  return idx;
}
origin: com.netflix.sstableadaptor/sstable-adaptor-cassandra

public long toTimeInMillis(ByteBuffer buffer) throws MarshalException
{
  return SimpleDateSerializer.dayToTimeInMillis(ByteBufferUtil.toInt(buffer));
}
origin: org.apache.cassandra/cassandra-all

static int getListIndex(ByteBuffer collectionElement) throws InvalidRequestException
{
  int idx = ByteBufferUtil.toInt(collectionElement);
  if (idx < 0)
    throw new InvalidRequestException(String.format("Invalid negative list index %d", idx));
  return idx;
}
origin: com.strapdata.cassandra/cassandra-all

public long toTimeInMillis(ByteBuffer buffer) throws MarshalException
{
  return SimpleDateSerializer.dayToTimeInMillis(ByteBufferUtil.toInt(buffer));
}
origin: org.apache.cassandra/cassandra-all

public long toTimeInMillis(ByteBuffer buffer) throws MarshalException
{
  return SimpleDateSerializer.dayToTimeInMillis(ByteBufferUtil.toInt(buffer));
}
org.apache.cassandra.utilsByteBufferUtiltoInt

Javadoc

Convert a byte buffer to an integer. Does not change the byte buffer position.

Popular methods of ByteBufferUtil

  • bytes
  • string
    Decode a String representation.
  • bytesToHex
  • getArray
    You should almost never use this. Instead, use the write* methods to avoid copies.
  • clone
  • hexToBytes
  • toFloat
  • toLong
  • toDouble
  • readBytes
  • arrayCopy
  • compareUnsigned
  • arrayCopy,
  • compareUnsigned,
  • read,
  • readShortLength,
  • compareSubArrays,
  • ensureCapacity,
  • getShortLength,
  • minimalBufferFor,
  • readBytesWithShortLength

Popular in Java

  • Start an intent from android
  • setScale (BigDecimal)
  • getSupportFragmentManager (FragmentActivity)
    Return the FragmentManager for interacting with fragments associated with this activity.
  • startActivity (Activity)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • JComboBox (javax.swing)
  • JFileChooser (javax.swing)
  • JLabel (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now