예제 #1
0
 private void assertReader(ChunkBuffer reader, Chunk... expected) {
   List<Chunk> res = Utils.list(reader);
   assertEquals(expected.length, res.size());
   for (int i = 0; i < expected.length; i++) {
     assertEquals(expected[i], res.get(i));
   }
 }
예제 #2
0
 public synchronized Iterable<CRaSHPlugin<?>> getPlugins() {
   if (plugins == null) {
     List<CRaSHPlugin<?>> plugins = Utils.list(discovery.getPlugins());
     for (CRaSHPlugin<?> plugin : plugins) {
       plugin.context = context;
       plugin.status = CRaSHPlugin.CONSTRUCTED;
     }
     this.plugins = plugins;
   }
   return plugins;
 }