示例#1
0
 /**
  * Factory for {@link Evictor}.
  *
  * @param conf {@link TachyonConf} to determine the {@link Evictor} type
  * @param view {@link BlockMetadataManagerView} to pass to {@link Evictor}
  * @param allocator an allocation policy
  * @return the generated {@link Evictor}
  */
 public static Evictor create(
     TachyonConf conf, BlockMetadataManagerView view, Allocator allocator) {
   try {
     return CommonUtils.createNewClassInstance(
         conf.<Evictor>getClass(Constants.WORKER_EVICTOR_CLASS),
         new Class[] {BlockMetadataManagerView.class, Allocator.class},
         new Object[] {view, allocator});
   } catch (Exception e) {
     throw Throwables.propagate(e);
   }
 }