Package org.apache.commons.lang.mutable

Examples of org.apache.commons.lang.mutable.MutableBoolean


    }

    @Override
    protected void initializeFields() {
        String path = getRequest().getResource().getFullPath();
        updating = new MutableBoolean();
        resourcePanel = new TextPanelWithTopLabel("Resource", path, new RestResourceEditor(getRequest().getResource(), updating));
        queryPanel = new ParametersField(getRequest());
    }
View Full Code Here


        UISupport.setDialogs(oldDialogs);
    }

    @Test
    public void changingPathTextForLonelyResourceShouldUpdateTheResourcePath() {
        RestResourceEditor restResourceEditor = new RestResourceEditor(lonelyResource, new MutableBoolean());
        restResourceEditor.setText("hello");
        assertThat(lonelyResource.getFullPath(), is("/hello"));
    }
View Full Code Here

    @Test
    public void displaysBasePathOfServiceInField() {
        lonelyResource.getInterface().setBasePath("/base");
        lonelyResource.setPath("resource");
        RestResourceEditor restResourceEditor = new RestResourceEditor(lonelyResource, new MutableBoolean());
        assertThat(restResourceEditor.getText(), is("/base/resource"));
    }
View Full Code Here

    @Test
    public void displaysResourcePopupIfHasBasePath() {
        lonelyResource.getInterface().setBasePath("/base");
        lonelyResource.setPath("resource");
        RestResourceEditor restResourceEditor = new RestResourceEditor(lonelyResource, new MutableBoolean());

        assertThat(restResourceEditor.mouseListener, is(notNullValue()));
    }
View Full Code Here

      }
    }
    fsIn.close();
    GenericTestUtils.waitFor(new Supplier<Boolean>() {
      public Boolean get() {
        final MutableBoolean finished = new MutableBoolean(false);
        cache.accept(new CacheVisitor() {
          @Override
          public void visit(int numOutstandingMmaps,
              Map<ExtendedBlockId, ShortCircuitReplica> replicas,
              Map<ExtendedBlockId, InvalidToken> failedLoads,
              Map<Long, ShortCircuitReplica> evictable,
              Map<Long, ShortCircuitReplica> evictableMmapped) {
            finished.setValue(evictableMmapped.isEmpty());
          }
        });
        return finished.booleanValue();
      }
    }, 10, 60000);

    cache.accept(new CountingVisitor(0, -1, -1, -1));
   
View Full Code Here

        final boolean expectedIsAnchored, final int expectedOutstandingMmaps)
          throws Exception {
    GenericTestUtils.waitFor(new Supplier<Boolean>() {
      @Override
      public Boolean get() {
        final MutableBoolean result = new MutableBoolean(false);
        cache.accept(new CacheVisitor() {
          @Override
          public void visit(int numOutstandingMmaps,
              Map<ExtendedBlockId, ShortCircuitReplica> replicas,
              Map<ExtendedBlockId, InvalidToken> failedLoads,
              Map<Long, ShortCircuitReplica> evictable,
              Map<Long, ShortCircuitReplica> evictableMmapped) {
            Assert.assertEquals(expectedOutstandingMmaps, numOutstandingMmaps);
            ShortCircuitReplica replica =
                replicas.get(ExtendedBlockId.fromExtendedBlock(block));
            Assert.assertNotNull(replica);
            Slot slot = replica.getSlot();
            if ((expectedIsAnchorable != slot.isAnchorable()) ||
                (expectedIsAnchored != slot.isAnchored())) {
              LOG.info("replica " + replica + " has isAnchorable = " +
                slot.isAnchorable() + ", isAnchored = " + slot.isAnchored() +
                ".  Waiting for isAnchorable = " + expectedIsAnchorable +
                ", isAnchored = " + expectedIsAnchored);
              return;
            }
            result.setValue(true);
          }
        });
        return result.toBoolean();
      }
    }, 10, 60000);
  }
View Full Code Here

TOP

Related Classes of org.apache.commons.lang.mutable.MutableBoolean

Copyright © 2018 www.massapicom. 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.