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


Java ConcatenationType类代码示例

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


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

示例1: cmdMap

import net.spy.memcached.ops.ConcatenationType; //导入依赖的package包/类
private static byte cmdMap(ConcatenationType t) {
  byte rv;
  switch (t) {
  case append:
    rv = APPEND;
    break;
  case prepend:
    rv = PREPEND;
    break;
  default:
    rv = DUMMY_OPCODE;
  }
  // Check fall-through.
  assert rv != DUMMY_OPCODE : "Unhandled store type:  " + t;
  return rv;
}
 
开发者ID:Alachisoft,项目名称:TayzGrid,代码行数:17,代码来源:ConcatenationOperationImpl.java

示例2: asyncCat

import net.spy.memcached.ops.ConcatenationType; //导入依赖的package包/类
private <T> Future<Boolean> asyncCat(
		ConcatenationType catType, long cas, String key,
		T value, Transcoder<T> tc) {
	CachedData co=tc.encode(value);
	final CountDownLatch latch=new CountDownLatch(1);
	final OperationFuture<Boolean> rv=new OperationFuture<Boolean>(latch,
			operationTimeout);
	Operation op=opFact.cat(catType, cas, key, co.getData(),
			new OperationCallback() {
		public void receivedStatus(OperationStatus val) {
			rv.set(val.isSuccess());
		}
		public void complete() {
			latch.countDown();
		}});
	rv.setOperation(op);
	addOp(key, op);
	return rv;
}
 
开发者ID:naver,项目名称:arcus-java-client,代码行数:20,代码来源:MemcachedClient.java

示例3: ConcatenationOperationImpl

import net.spy.memcached.ops.ConcatenationType; //导入依赖的package包/类
public ConcatenationOperationImpl(ConcatenationType t, String k, byte[] d,
    long c, OperationCallback cb) {
  super(cmdMap(t), generateOpaque(), k, cb);
  data = d;
  cas = c;
  catType = t;
}
 
开发者ID:Alachisoft,项目名称:TayzGrid,代码行数:8,代码来源:ConcatenationOperationImpl.java

示例4: cmdMap

import net.spy.memcached.ops.ConcatenationType; //导入依赖的package包/类
private static int cmdMap(ConcatenationType t) {
	int rv=-1;
	switch(t) {
		case append: rv=APPEND; break;
		case prepend: rv=PREPEND; break;
	}
	// Check fall-through.
	assert rv != -1 : "Unhandled store type:  " + t;
	return rv;
}
 
开发者ID:naver,项目名称:arcus-java-client,代码行数:11,代码来源:ConcatenationOperationImpl.java

示例5: ConcatenationOperationImpl

import net.spy.memcached.ops.ConcatenationType; //导入依赖的package包/类
public ConcatenationOperationImpl(ConcatenationType t, String k,
		byte[] d, long c, OperationCallback cb) {
	super(cmdMap(t), generateOpaque(), cb);
	key=k;
	data=d;
	cas=c;
	catType=t;
}
 
开发者ID:naver,项目名称:arcus-java-client,代码行数:9,代码来源:ConcatenationOperationImpl.java

示例6: ConcatenationOperationImpl

import net.spy.memcached.ops.ConcatenationType; //导入依赖的package包/类
public ConcatenationOperationImpl(ConcatenationType t, String k,
	byte[] d, OperationCallback cb) {
	super(t.name(), k, 0, 0, d, cb);
	concatType = t;
	if (t == ConcatenationType.append)
		setAPIType(APIType.APPEND);
	else if (t == ConcatenationType.prepend)
		setAPIType(APIType.PREPEND);
}
 
开发者ID:naver,项目名称:arcus-java-client,代码行数:10,代码来源:ConcatenationOperationImpl.java

示例7: testConcatenationOperationAppendCloning

import net.spy.memcached.ops.ConcatenationType; //导入依赖的package包/类
public void testConcatenationOperationAppendCloning() {
	long casId = 82757248;
	ConcatenationOperation op = ofact.cat(ConcatenationType.append, casId,
		TEST_KEY, testData, genericCallback);

	ConcatenationOperation op2 = cloneOne(
			ConcatenationOperation.class, op);
	assertKey(op2);
	assertSame(ConcatenationType.append, op2.getStoreType());
	assertCallback(op2);
}
 
开发者ID:naver,项目名称:arcus-java-client,代码行数:12,代码来源:OperationFactoryTestBase.java

示例8: testConcatenationOperationPrependCloning

import net.spy.memcached.ops.ConcatenationType; //导入依赖的package包/类
public void testConcatenationOperationPrependCloning() {
	long casId = 82757248;
	ConcatenationOperation op = ofact.cat(ConcatenationType.prepend, casId,
		TEST_KEY, testData, genericCallback);

	ConcatenationOperation op2 = cloneOne(
			ConcatenationOperation.class, op);
	assertKey(op2);
	assertSame(ConcatenationType.prepend, op2.getStoreType());
	assertCallback(op2);
}
 
开发者ID:naver,项目名称:arcus-java-client,代码行数:12,代码来源:OperationFactoryTestBase.java

示例9: cat

import net.spy.memcached.ops.ConcatenationType; //导入依赖的package包/类
public ConcatenationOperation cat(ConcatenationType catType, long casId,
    String key, byte[] data, OperationCallback cb) {
  return new ConcatenationOperationImpl(catType, key, data, casId, cb);
}
 
开发者ID:Alachisoft,项目名称:TayzGrid,代码行数:5,代码来源:BinaryOperationFactory.java

示例10: getStoreType

import net.spy.memcached.ops.ConcatenationType; //导入依赖的package包/类
public ConcatenationType getStoreType() {
  return catType;
}
 
开发者ID:Alachisoft,项目名称:TayzGrid,代码行数:4,代码来源:ConcatenationOperationImpl.java

示例11: cat

import net.spy.memcached.ops.ConcatenationType; //导入依赖的package包/类
public ConcatenationOperation cat(ConcatenationType catType, long casId,
    String key, byte[] data, OperationCallback cb) {
  return new ConcatenationOperationImpl(catType, key, data, cb);
}
 
开发者ID:Alachisoft,项目名称:TayzGrid,代码行数:5,代码来源:AsciiOperationFactory.java

示例12: ConcatenationOperationImpl

import net.spy.memcached.ops.ConcatenationType; //导入依赖的package包/类
public ConcatenationOperationImpl(ConcatenationType t, String k, byte[] d,
    OperationCallback cb) {
  super(t.name(), k, 0, 0, d, cb);
  concatType = t;
}
 
开发者ID:Alachisoft,项目名称:TayzGrid,代码行数:6,代码来源:ConcatenationOperationImpl.java

示例13: getStoreType

import net.spy.memcached.ops.ConcatenationType; //导入依赖的package包/类
public ConcatenationType getStoreType() {
  return concatType;
}
 
开发者ID:Alachisoft,项目名称:TayzGrid,代码行数:4,代码来源:ConcatenationOperationImpl.java

示例14: cat

import net.spy.memcached.ops.ConcatenationType; //导入依赖的package包/类
public ConcatenationOperation cat(ConcatenationType catType, long casId,
		String key, byte[] data, OperationCallback cb) {
	return new ConcatenationOperationImpl(catType, key, data, casId, cb);
}
 
开发者ID:naver,项目名称:arcus-java-client,代码行数:5,代码来源:BinaryOperationFactory.java

示例15: getStoreType

import net.spy.memcached.ops.ConcatenationType; //导入依赖的package包/类
public ConcatenationType getStoreType() {
	return catType;
}
 
开发者ID:naver,项目名称:arcus-java-client,代码行数:4,代码来源:ConcatenationOperationImpl.java


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