Examples of drain()


Examples of com.facebook.testing.MockExecutor.drain()

    taskGroup.register(runnable3);

    TaskGroup.FinishLatch latch = taskGroup.execute();

    // Run all tasks
    mockExecutor.drain();

    // Should not block
    latch.await();

    Assert.assertTrue(runnable1.isRun());
View Full Code Here

Examples of com.hazelcast.concurrent.semaphore.Permit.drain()

    }

    @Override
    public void run() throws Exception {
        Permit permit = getPermit();
        response = permit.drain(getCallerUuid());
    }

    @Override
    public boolean shouldBackup() {
        return !response.equals(0);
View Full Code Here

Examples of com.hazelcast.concurrent.semaphore.Permit.drain()

    }

    @Override
    public void run() throws Exception {
        Permit permit = getPermit();
        permit.drain(firstCaller);
        response = true;
    }

    @Override
    public int getFactoryId() {
View Full Code Here

Examples of com.hazelcast.queue.impl.QueueContainer.drain()

    }

    @Override
    public void run() throws Exception {
        QueueContainer container = getOrCreateContainer();
        dataMap = container.drain(maxSize);
        response = new SerializableCollection(new ArrayList<Data>(dataMap.values()));
    }

    @Override
    public void afterRun() throws Exception {
View Full Code Here

Examples of com.netflix.priam.utils.JMXNodeTool.drain()

    } catch (JMXConnectionException e) {
      return Response.status(503).entity("JMXConnectionException")
          .build();
    }
        logger.debug("node tool drain being called");
        nodetool.drain();
        return Response.ok(REST_SUCCESS, MediaType.APPLICATION_JSON).build();
    }
   
}
View Full Code Here

Examples of com.netflix.suro.queue.FileQueue4Sink.drain()

    @Test
    public void test() throws IOException {
        FileQueue4Sink queue = new FileQueue4Sink(folder.newFolder().getAbsolutePath(), "testqueue", "PT1m", 1024 * 1024 * 1024);
        assertEquals(queue.size(), 0);
        assertEquals(queue.isEmpty(), true);
        assertEquals(queue.drain(100, new LinkedList<Message>()), 0);

        for (int i = 0; i < 100; ++i) {
            queue.offer(new Message("routingkey" + i, ("value" + i).getBytes()));
        }

View Full Code Here

Examples of com.netflix.suro.queue.MemoryQueue4Sink.drain()

    @Test
    public void test() throws IOException {
        MemoryQueue4Sink queue = new MemoryQueue4Sink(100);
        assertEquals(queue.size(), 0);
        assertEquals(queue.isEmpty(), true);
        assertEquals(queue.drain(100, new LinkedList<Message>()), 0);

        for (int i = 0; i < 100; ++i) {
            queue.offer(new Message("routingkey" + i, ("value" + i).getBytes()));
        }
View Full Code Here

Examples of crazypants.enderio.conduit.liquid.ILiquidConduit.drain()

  @Override
  public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain) {
    ILiquidConduit lc = getConduit(ILiquidConduit.class);
    if(lc != null) {
      return lc.drain(from, resource, doDrain);
    }
    return null;
  }

  @Override
View Full Code Here

Examples of erogenousbeef.bigreactors.common.multiblock.MultiblockTurbine.drain()

    // Try to pump steam out, if an outlet
    if(pumpDestination == null || flowSetting != FluidFlow.Out)
      return;

    MultiblockTurbine turbine = getTurbine();
    FluidStack fluidToDrain = turbine.drain(MultiblockTurbine.TANK_OUTPUT, turbine.TANK_SIZE, false);
   
    if(fluidToDrain != null && fluidToDrain.amount > 0)
    {
      fluidToDrain.amount = pumpDestination.fill(getOutwardsDir().getOpposite(), fluidToDrain, true);
      turbine.drain(MultiblockTurbine.TANK_OUTPUT, fluidToDrain, true);
View Full Code Here

Examples of erogenousbeef.bigreactors.common.multiblock.helpers.CoolantContainer.drain()

  public FluidStack drain(ForgeDirection from, FluidStack resource,
      boolean doDrain) {
    if(!isConnected() || from != getOutwardsDir()) { return null; }

    CoolantContainer cc = getReactorController().getCoolantContainer();
    return cc.drain(getConnectedTank(), resource, doDrain);
  }

  @Override
  public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain) {
    if(!isConnected() || from != getOutwardsDir()) { return null; }
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.