本文整理匯總了Java中com.thinkaurelius.titan.diskstorage.util.WriteBufferUtil類的典型用法代碼示例。如果您正苦於以下問題:Java WriteBufferUtil類的具體用法?Java WriteBufferUtil怎麽用?Java WriteBufferUtil使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
WriteBufferUtil類屬於com.thinkaurelius.titan.diskstorage.util包,在下文中一共展示了WriteBufferUtil類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: toLockKey
import com.thinkaurelius.titan.diskstorage.util.WriteBufferUtil; //導入依賴的package包/類
public StaticBuffer toLockKey(StaticBuffer key, StaticBuffer column) {
WriteBuffer b = new WriteByteBuffer(key.length() + column.length() + 4);
b.putInt(key.length());
WriteBufferUtil.put(b,key);
WriteBufferUtil.put(b,column);
return b.getStaticBuffer();
}
示例2: toLockCol
import com.thinkaurelius.titan.diskstorage.util.WriteBufferUtil; //導入依賴的package包/類
public StaticBuffer toLockCol(Instant ts, StaticBuffer rid, TimestampProvider provider) {
WriteBuffer b = new WriteByteBuffer(rid.length() + 8);
b.putLong(provider.getTime(ts));
WriteBufferUtil.put(b, rid);
return b.getStaticBuffer();
}
示例3: toLockCol
import com.thinkaurelius.titan.diskstorage.util.WriteBufferUtil; //導入依賴的package包/類
public StaticBuffer toLockCol(long ts, StaticBuffer rid) {
WriteBuffer b = new WriteByteBuffer(rid.length() + 8);
b.putLong(ts);
WriteBufferUtil.put(b, rid);
return b.getStaticBuffer();
}