Package org.apache.commons.lang.mutable

Examples of org.apache.commons.lang.mutable.MutableBoolean.booleanValue()


                if (klass.isAnnotationPresent(annotation)) {
                    bool.setValue(true);
                }
            }
        });
        return bool.booleanValue();
    }

    /**
     * Returns the list of fields on this class annotated with the passed {@link Annotation}
     * @param klass checks the {@link Field}s on this class
View Full Code Here


      try {
        MutableBoolean usedPeer = new MutableBoolean(false);
        slot = cache.allocShmSlot(datanode, peer, usedPeer,
            new ExtendedBlockId(block.getBlockId(), block.getBlockPoolId()),
            clientName);
        if (usedPeer.booleanValue()) {
          if (LOG.isTraceEnabled()) {
            LOG.trace(this + ": allocShmSlot used up our previous socket " +
              peer.getDomainSocket() + ".  Allocating a new one...");
          }
          curPeer = nextDomainPeer();
View Full Code Here

              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

      }
    };
    new Thread(initializer).start();
    Thread.sleep(1000L); // wait a second for thread to start and call getNumUsers()
    model.getNumUsers(); // should block
    assertTrue(initialized.booleanValue());
    assertEquals(4, model.getNumUsers());
  }

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

            session, pentahoJcrConstants, file.getId() ), PentahoSessionHolder.getSession() ) ) ) {
      MutableBoolean foundFilteredAtomic = new MutableBoolean( !isPentahoFolder( pentahoJcrConstants, childNode ) );
      RepositoryFileTree repositoryFileTree =
          getTreeByNode( session, pentahoJcrConstants, pathConversionHelper, lockHelper, childNode, depth - 1,
              childNodeFilter, showHidden, accessVoterManager, types, foundFilteredAtomic );
      if ( repositoryFileTree != null && ( foundFilteredAtomic.booleanValue() || isRootFiltered ) ) {
        foundFiltered.setValue( true );
        children.add( repositoryFileTree );
      }
    }
  }
View Full Code Here

          }
        }
    );

    Stopwatch stopwatch = Stopwatch.createStarted();
    while (!committed.booleanValue()) {
      Thread.sleep(100);
      if (stopwatch.elapsed(TimeUnit.MILLISECONDS) > 1000) {
        throw new ISE("Taking too long to set perist value");
      }
    }
View Full Code Here

    final MutableBoolean expired = new MutableBoolean(false);
    AuthTicketCache tokens = new AuthTicketCache()
    {
      @Override
      protected boolean isTokenExpired(long now, Entry<String, Long> entry) {
        return expired.booleanValue();
      }
    };

    tokens.add("foo");
    assertThat(tokens.remove("foo"), is(true));
View Full Code Here

      }
    };
    new Thread(initializer).start();
    Thread.sleep(1000L); // wait a second for thread to start and call getNumUsers()
    model.getNumUsers(); // should block
    assertTrue(initialized.booleanValue());
    assertEquals(4, model.getNumUsers());
  }

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

      try {
        MutableBoolean usedPeer = new MutableBoolean(false);
        slot = cache.allocShmSlot(datanode, peer, usedPeer,
            new ExtendedBlockId(block.getBlockId(), block.getBlockPoolId()),
            clientName);
        if (usedPeer.booleanValue()) {
          if (LOG.isTraceEnabled()) {
            LOG.trace(this + ": allocShmSlot used up our previous socket " +
              peer.getDomainSocket() + ".  Allocating a new one...");
          }
          curPeer = nextDomainPeer();
View Full Code Here

        new DatanodeInfo(cluster.getDataNodes().get(0).getDatanodeId());
    // Allocating the first shm slot requires using up a peer.
    Slot slot = cache.allocShmSlot(datanode, peer, usedPeer,
                    blockId, "testAllocShm_client");
    Assert.assertNotNull(slot);
    Assert.assertTrue(usedPeer.booleanValue());
    cache.getDfsClientShmManager().visit(new Visitor() {
      @Override
      public void visit(HashMap<DatanodeInfo, PerDatanodeVisitorInfo> info)
          throws IOException {
        // The ClientShmManager starts off empty
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.