Package org.apache.commons.lang.mutable

Examples of org.apache.commons.lang.mutable.MutableInt.intValue()


        if (count == null) {
          count = new MutableInt();
          filesMap.put(lqi.family, count);
        }
        count.increment();
        if (count.intValue() > maxFilesPerRegionPerFamily) {
          LOG.error("Trying to load more than " + maxFilesPerRegionPerFamily
            + " hfiles to family " + Bytes.toStringBinary(lqi.family)
            + " of region with start key "
            + Bytes.toStringBinary(e.getKey()));
          return false;
View Full Code Here


        client.dispatch("vm://in3","some message",null);
        if (!latch.await(TIMEOUT, TimeUnit.MILLISECONDS))
        {
            fail("message should have been delivered at least 5 times");
        }
        assertThat(deliveredTimes.intValue(),is(EXPECTED_DELIVERED_TIMES));
    }

    @Test
    @Ignore("MULE-6926: flaky test")
    public void testInboundEndpointMaxRedeliveryTakesPrecendence() throws Exception
View Full Code Here

        client.dispatch("vm://in4","some message",null);
        if (!latch.await(TIMEOUT, TimeUnit.MILLISECONDS))
        {
            fail("message should have been delivered at least 5 times");
        }
        assertThat(deliveredTimes.intValue(),is(EXPECTED_DELIVERED_TIMES));
    }

    @Test
    public void testRollbackExceptionStrategyCatchMessageRedeliveryDespiteChoiceConfiguration() throws Exception
    {
View Full Code Here

        client.dispatch("jms://in2?connector=activeMq", MESSAGE,null);
        if (!latch.await(TIMEOUT, TimeUnit.MILLISECONDS))
        {
            fail("message should have been delivered at least 5 times");
        }
        assertThat(deliveredTimes.intValue(), is(EXPECTED_DELIVERED_TIMES));
        MuleMessage dlqMessage = client.request("jms://dlq?connector=activeMq", TIMEOUT);
        assertThat(dlqMessage, IsNull.<Object>notNullValue());
        assertThat(dlqMessage.getPayloadAsString(), is(MESSAGE_EXPECTED));
    }
View Full Code Here

        client.dispatch("jms://in3?connector=activeMq", MESSAGE, null);
        if (!latch.await(TIMEOUT, TimeUnit.MILLISECONDS))
        {
            fail("message should have been delivered at least 5 times");
        }
        assertThat(deliveredTimes.intValue(), is(EXPECTED_DELIVERED_TIMES));
        MuleMessage dlqMessage = client.request("jms://dlq?connector=activeMq", TIMEOUT);
        assertThat(dlqMessage, IsNull.<Object>notNullValue());
        assertThat(dlqMessage.getPayloadAsString(), is(MESSAGE_EXPECTED));
    }
View Full Code Here

        long t = EnvironmentEdgeManager.currentTime();
        if ((t - last_report_at) > reportPeriod) {
          last_report_at = t;
          int latestZKVersion =
              attemptToOwnTask(false, watcher, server.getServerName(), curTask,
                mode, zkVersion.intValue());
          if (latestZKVersion < 0) {
            LOG.warn("Failed to heartbeat the task" + curTask);
            return false;
          }
          zkVersion.setValue(latestZKVersion);
View Full Code Here

                return false;
            }

            i.decrement();

            if(i.intValue() == 0) {
                map.remove(obj);
            }

            return true;
        }
View Full Code Here

      public boolean progress() {
        long t = EnvironmentEdgeManager.currentTimeMillis();
        if ((t - last_report_at) > reportPeriod) {
          last_report_at = t;
          int latestZKVersion =
              attemptToOwnTask(false, watcher, serverName, curTask, zkVersion.intValue());
          if (latestZKVersion < 0) {
            LOG.warn("Failed to heartbeat the task" + curTask);
            return false;
          }
          zkVersion.setValue(latestZKVersion);
View Full Code Here

        if (count == null) {
          count = new MutableInt();
          filesMap.put(lqi.family, count);
        }
        count.increment();
        if (count.intValue() > maxFilesPerRegionPerFamily) {
          LOG.error("Trying to load more than " + maxFilesPerRegionPerFamily
            + " hfiles to family " + Bytes.toStringBinary(lqi.family)
            + " of region with start key "
            + Bytes.toStringBinary(e.getKey()));
          return false;
View Full Code Here

        if (count == null) {
          count = new MutableInt();
          filesMap.put(lqi.family, count);
        }
        count.increment();
        if (count.intValue() > maxFilesPerRegionPerFamily) {
          LOG.error("Trying to load more than " + maxFilesPerRegionPerFamily
            + " hfiles to family " + Bytes.toStringBinary(lqi.family)
            + " of region with start key "
            + Bytes.toStringBinary(e.getKey()));
          return false;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.