예제 #1
0
 /** returns a list of all available codec names */
 public static Set<String> availableCodecs() {
   if (loader == null) {
     throw new IllegalStateException(
         "You called Codec.availableCodecs() before all Codecs could be initialized. "
             + "This likely happens if you call it from a Codec's ctor.");
   }
   return loader.availableServices();
 }
예제 #2
0
 /** looks up a codec by name */
 public static Codec forName(String name) {
   if (loader == null) {
     throw new IllegalStateException(
         "You called Codec.forName() before all Codecs could be initialized. "
             + "This likely happens if you call it from a Codec's ctor.");
   }
   return loader.lookup(name);
 }
예제 #3
0
파일: Codec.java 프로젝트: naryad/Solr4.0
 /** returns a list of all available codec names */
 public static Set<String> availableCodecs() {
   return loader.availableServices();
 }
예제 #4
0
파일: Codec.java 프로젝트: naryad/Solr4.0
 /** looks up a codec by name */
 public static Codec forName(String name) {
   return loader.lookup(name);
 }
예제 #5
0
파일: Codec.java 프로젝트: naryad/Solr4.0
 public Codec(String name) {
   NamedSPILoader.checkServiceName(name);
   this.name = name;
 }
예제 #6
0
 /**
  * Reloads the codec list from the given {@link ClassLoader}. Changes to the codecs are visible
  * after the method ends, all iterators ({@link #availableCodecs()},...) stay consistent.
  *
  * <p><b>NOTE:</b> Only new codecs are added, existing ones are never removed or replaced.
  *
  * <p><em>This method is expensive and should only be called for discovery of new codecs on the
  * given classpath/classloader!</em>
  */
 public static void reloadCodecs(ClassLoader classloader) {
   loader.reload(classloader);
 }