ArrayBasedIntToIntArrayMap implements IntToIntArrayMap { @Override public int getArrayLength(int key) { if (crossMemoryBarrier() == 0) { return 0; } return readerAccessibleInfo.nodeInfo.getSecondValue(key); } ArrayBasedIntToIntArrayMap(
    int expectedNumNodes,
    int expectedArraySize,
    StatsReceiver statsReceiver
  ); @Override boolean put(int key, int[] value); @Override IntIterator get(int key); @Override IntIterator get(int key, ReusableNodeIntIterator regularDegreeEdgeIterator); @Override int getArrayLength(int key); @Override /** * The method does not call crossMemoryBarrier on its own to save cost, and the caller of it * needs to make sure the method is either preceded or followed by another method which calls * crossMemoryBarrier. * * This method stores like, retweet, reply and quote counts into four i16s. However, since the * value of this store is i32s, we need to compress two i16s into one i32. The schema is to pack * Retweet and Favorite counts into the first integer, and Reply and Quote counts into the second * integer. Retweet and Quote counts occupy the most significant 16 bits of the integers, and the * other two counts occupy the lower 16 bits of the integers. */ boolean incrementFeatureValue(int key, byte edgeType);  }
@Test public void testGetArrayLengthReturningZero() { ArrayBasedIntToIntArrayMap arrayBasedIntToIntArrayMap = new ArrayBasedIntToIntArrayMap(2856, 0, new NullStatsReceiver()); assertEquals(0, arrayBasedIntToIntArrayMap.getArrayLength(2856)); }