Examples of BlockKey


Examples of mods.railcraft.common.util.collections.BlockKey

    static {
        registerBallast(Blocks.gravel, 0);
    }

    public static void registerBallast(Block block, int metadata) {
        ballastRegistry.add(new BlockKey(block, metadata));
    }
View Full Code Here

Examples of mods.railcraft.common.util.collections.BlockKey

        ballastRegistry.add(new BlockKey(block, metadata));
    }

    public static boolean isItemBallast(ItemStack stack) {
        if (stack.getItem() instanceof ItemBlock)
            return ballastRegistry.contains(new BlockKey(((ItemBlock) stack.getItem()).field_150939_a, stack.getItemDamage()));
        return false;
    }
View Full Code Here

Examples of mods.railcraft.common.util.collections.BlockKey

    public static void addMineableBlock(Block block) {
        addMineableBlock(block, -1);
    }

    public static void addMineableBlock(Block block, int meta) {
        mineableBlocks.add(new BlockKey(block, meta));
    }
View Full Code Here

Examples of org.apache.hadoop.hdfs.security.token.block.BlockKey

    return BlockKeyProto.newBuilder().setKeyId(key.getKeyId())
        .setKeyBytes(keyBytes).setExpiryDate(key.getExpiryDate()).build();
  }

  public static BlockKey convert(BlockKeyProto k) {
    return new BlockKey(k.getKeyId(), k.getExpiryDate(), k.getKeyBytes()
        .toByteArray());
  }
View Full Code Here

Examples of org.apache.hadoop.hdfs.security.token.block.BlockKey

    return BlockKeyProto.newBuilder().setKeyId(key.getKeyId())
        .setKeyBytes(keyBytes).setExpiryDate(key.getExpiryDate()).build();
  }

  public static BlockKey convert(BlockKeyProto k) {
    return new BlockKey(k.getKeyId(), k.getExpiryDate(), k.getKeyBytes()
        .toByteArray());
  }
View Full Code Here

Examples of org.apache.hadoop.hdfs.security.token.block.BlockKey

    return BlockKeyProto.newBuilder().setKeyId(key.getKeyId())
        .setKeyBytes(keyBytes).setExpiryDate(key.getExpiryDate()).build();
  }

  public static BlockKey convert(BlockKeyProto k) {
    return new BlockKey(k.getKeyId(), k.getExpiryDate(), k.getKeyBytes()
        .toByteArray());
  }
View Full Code Here

Examples of org.apache.hadoop.hdfs.security.token.block.BlockKey

      compare(blocks[i], blocks2[i]);
    }
  }

  private static BlockKey getBlockKey(int keyId) {
    return new BlockKey(keyId, 10, "encodedKey".getBytes());
  }
View Full Code Here

Examples of org.apache.hadoop.hdfs.security.token.block.BlockKey

    assertTrue(Arrays.equals(k1.getEncodedKey(), k2.getEncodedKey()));
  }

  @Test
  public void testConvertBlockKey() {
    BlockKey key = getBlockKey(1);
    BlockKeyProto keyProto = PBHelper.convert(key);
    BlockKey key1 = PBHelper.convert(keyProto);
    compare(key, key1);
  }
View Full Code Here

Examples of org.apache.hadoop.hdfs.security.token.block.BlockKey

    return BlockKeyProto.newBuilder().setKeyId(key.getKeyId())
        .setKeyBytes(keyBytes).setExpiryDate(key.getExpiryDate()).build();
  }

  public static BlockKey convert(BlockKeyProto k) {
    return new BlockKey(k.getKeyId(), k.getExpiryDate(), k.getKeyBytes()
        .toByteArray());
  }
View Full Code Here

Examples of org.apache.hadoop.hdfs.security.token.block.BlockKey

    return BlockKeyProto.newBuilder().setKeyId(key.getKeyId())
        .setKeyBytes(keyBytes).setExpiryDate(key.getExpiryDate()).build();
  }

  public static BlockKey convert(BlockKeyProto k) {
    return new BlockKey(k.getKeyId(), k.getExpiryDate(), k.getKeyBytes()
        .toByteArray());
  }
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.