当前位置: 首页>>代码示例>>Java>>正文


Java Consts类代码示例

本文整理汇总了Java中nl.vu.cs.ajira.utils.Consts的典型用法代码示例。如果您正苦于以下问题:Java Consts类的具体用法?Java Consts怎么用?Java Consts使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Consts类属于nl.vu.cs.ajira.utils包,在下文中一共展示了Consts类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: printStatistics

import nl.vu.cs.ajira.utils.Consts; //导入依赖的package包/类
public void printStatistics() {

		String stats = getStatistics();

		if (log.isInfoEnabled()) {
			log.info(stats);
		} else {
			System.out.println(stats);
		}

		if (getState().equals(Consts.STATE_FAILED) && exception != null) {
			if (log.isErrorEnabled()) {
				log.error("Job failed with exception", exception);
			} else {
				System.err.println("Job failed with exception " + exception);
				exception.printStackTrace(System.err);
			}
		}
	}
 
开发者ID:jrbn,项目名称:ajira,代码行数:20,代码来源:Submission.java

示例2: set

import nl.vu.cs.ajira.utils.Consts; //导入依赖的package包/类
/**
 * Sets the fields of the class.
 * 
 * @param elements
 *            is a array or a sequence of SimpleData objects
 */
public void set(SimpleData... elements) {
	if (elements != null) {
		/*
		 * if (log.isDebugEnabled() && signature != null && elements.length
		 * != signature.length) { log.debug("Changing elements of tuple to "
		 * + elements.length, new Throwable()); }
		 */
		if (elements.length > Consts.MAX_TUPLE_ELEMENTS) {
			throw new Error("Too many elements in tuple");
		}
		signature = elements;
		nElements = elements.length;
	} else {
		nElements = 0;
	}
}
 
开发者ID:jrbn,项目名称:ajira,代码行数:23,代码来源:Tuple.java

示例3: TupleSender

import nl.vu.cs.ajira.utils.Consts; //导入依赖的package包/类
/**
 * Custom constructor.
 * 
 * @param context
 *            Current context
 */
public TupleSender(Context context) {
	this.context = context;
	this.buckets = context.getBuckets();
               this.compressing = context.getConfiguration().getBoolean(Consts.SEND_TUPLES_COMPRESSED, true);
	ThreadPool.createNew(new Runnable() {
		@Override
		public void run() {
			checkTuples();
		}
	}, "TupleSenderChecker");
	for (int i = 0; i < Consts.MAX_TUPLE_SENDERS; i++) {
		ThreadPool.createNew(new Runnable() {
			@Override
			public void run() {
				sendTuples();
			}
		}, "TupleSender " + i);
	}
}
 
开发者ID:jrbn,项目名称:ajira,代码行数:26,代码来源:TupleSender.java

示例4: startReasoner

import nl.vu.cs.ajira.utils.Consts; //导入依赖的package包/类
public void startReasoner(String[] args) throws Exception {

		Ajira arch = new Ajira(true);

		Configuration conf = arch.getConfiguration();
		parseArgs(args, conf);
		conf.set("indexFileImpl", PlainTripleFile.class.getName());
		InputLayer.setDefaultInputLayerClass(RDFStorage.class, conf);

		if (useGAT) {
			log.debug("Going to use JavaGAT...");
			GATContext context = new GATContext();
			Preferences prefs = new Preferences();
			prefs.put("file.adaptor.name", "local,commandlinessh");
			prefs.put("fileinputstream.adaptor.name", "local,copying");
			context.addPreferences(prefs);
			GAT.setDefaultGATContext(context);

			conf.set(RDFStorage.FILES_INTERFACE,
					JavaGATFilesInterface.class.getName());
		}

		conf.setBoolean(Consts.SEND_TUPLES_COMPRESSED, false); // Probably not
		// worth the
		// effort
		arch.startup();
	}
 
开发者ID:jrbn,项目名称:querypie,代码行数:28,代码来源:QueryPIE.java

示例5: main

import nl.vu.cs.ajira.utils.Consts; //导入依赖的package包/类
public static void main(String[] args) {
  AjiraEval runner = new AjiraEval();
  Ajira ajira = new Ajira();
  ajira.getConfiguration().set(InputLayer.INPUT_LAYER_CLASS, RandomGeneratorInputLayer.class.getName());
  ajira.getConfiguration().setInt(Consts.N_PROC_THREADS, numThreads);
  try {
    ajira.startup();
  } catch (Exception e) {
    e.printStackTrace();
  }
  if (runSingleThreadExamples) runner.runSingleThreadExamples(ajira);
  if (runMultiThreadExamples) runner.runMultiThreadExamples(ajira);
  ajira.shutdown();
}
 
开发者ID:jrbn,项目名称:ajira,代码行数:15,代码来源:AjiraEval.java

示例6: killSubmission

import nl.vu.cs.ajira.utils.Consts; //导入依赖的package包/类
public void killSubmission(int submissionId, Throwable e) {
	Submission sub = submissions.get(submissionId);
	if (sub == null) {
		return;
	}
	synchronized (sub) {
		if (sub.getState() == Consts.STATE_FINISHED) {
			return;
		}
		sub.setFinished(Consts.STATE_FAILED);
		sub.setException(e);
		sub.notifyAll();
	}
}
 
开发者ID:jrbn,项目名称:ajira,代码行数:15,代码来源:SubmissionRegistry.java

示例7: getStatistics

import nl.vu.cs.ajira.utils.Consts; //导入依赖的package包/类
public void getStatistics(Submission submission) {
	if (net.getNumberNodes() > 1) {
		// TODO: to replace with a faster method to retrieve the statistics
		try {
			Thread.sleep(Consts.STATISTICS_COLLECTION_INTERVAL);
		} catch (InterruptedException e) {
			// ignore
		}
	}

	submission.counters = stats.removeCountersSubmission(submission
			.getSubmissionId());
}
 
开发者ID:jrbn,项目名称:ajira,代码行数:14,代码来源:SubmissionRegistry.java

示例8: Submission

import nl.vu.cs.ajira.utils.Consts; //导入依赖的package包/类
public Submission(int submissionId, int assignedOutputBucket) {
	startupTime = System.currentTimeMillis();
	state = Consts.STATE_OPEN;
	finalStatsReceived = 0;
	rootChainsReceived = -1;
	assignedBucket = assignedOutputBucket;
	this.submissionId = submissionId;
	mainRootReceived = false;
}
 
开发者ID:jrbn,项目名称:ajira,代码行数:10,代码来源:Submission.java

示例9: getIdDatatype

import nl.vu.cs.ajira.utils.Consts; //导入依赖的package包/类
@Override
/**
 * Returns the id of the class.
 */
public int getIdDatatype() {
	return Consts.DATATYPE_TSTRINGARRAY;
}
 
开发者ID:jrbn,项目名称:ajira,代码行数:8,代码来源:TStringArray.java

示例10: getIdDatatype

import nl.vu.cs.ajira.utils.Consts; //导入依赖的package包/类
@Override
/**
 * Returns the id of data class type.
 */
public int getIdDatatype() {
	return Consts.DATATYPE_TINT;
}
 
开发者ID:jrbn,项目名称:ajira,代码行数:8,代码来源:TInt.java

示例11: getIdDatatype

import nl.vu.cs.ajira.utils.Consts; //导入依赖的package包/类
@Override
/**
 * Returns the id of the class.
 */
public int getIdDatatype() {
	return Consts.DATATYPE_TBOOLEANARRAY;
}
 
开发者ID:jrbn,项目名称:ajira,代码行数:8,代码来源:TBooleanArray.java

示例12: getIdDatatype

import nl.vu.cs.ajira.utils.Consts; //导入依赖的package包/类
@Override
/**
 * returns the id of data class type.
 */
public int getIdDatatype() {
	return Consts.DATATYPE_TSTRING;
}
 
开发者ID:jrbn,项目名称:ajira,代码行数:8,代码来源:TString.java

示例13: getIdDatatype

import nl.vu.cs.ajira.utils.Consts; //导入依赖的package包/类
@Override
/**
 * Returns the id of the class.
 */
public int getIdDatatype() {
	return Consts.DATATYPE_TINTARRAY;
}
 
开发者ID:jrbn,项目名称:ajira,代码行数:8,代码来源:TIntArray.java

示例14: getIdDatatype

import nl.vu.cs.ajira.utils.Consts; //导入依赖的package包/类
@Override
/**
 * Returns the id of data class type.
 */
public int getIdDatatype() {
	return Consts.DATATYPE_TLONG;
}
 
开发者ID:jrbn,项目名称:ajira,代码行数:8,代码来源:TLong.java

示例15: getIdDatatype

import nl.vu.cs.ajira.utils.Consts; //导入依赖的package包/类
@Override
/**
 * Returns the id of the class.
 */
public int getIdDatatype() {
	return Consts.DATATYPE_TLONGARRAY;
}
 
开发者ID:jrbn,项目名称:ajira,代码行数:8,代码来源:TLongArray.java


注:本文中的nl.vu.cs.ajira.utils.Consts类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。