本文整理汇总了Java中com.thinkaurelius.titan.diskstorage.StaticBuffer.length方法的典型用法代码示例。如果您正苦于以下问题:Java StaticBuffer.length方法的具体用法?Java StaticBuffer.length怎么用?Java StaticBuffer.length使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.thinkaurelius.titan.diskstorage.StaticBuffer
的用法示例。
在下文中一共展示了StaticBuffer.length方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: toLockKey
import com.thinkaurelius.titan.diskstorage.StaticBuffer; //导入方法依赖的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: equals
import com.thinkaurelius.titan.diskstorage.StaticBuffer; //导入方法依赖的package包/类
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null) return false;
if (!(o instanceof StaticBuffer)) return false;
StaticBuffer b = (StaticBuffer)o;
if (length()!=b.length()) return false;
return compareTo(b)==0;
}
示例3: toLockCol
import com.thinkaurelius.titan.diskstorage.StaticBuffer; //导入方法依赖的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();
}
示例4: put
import com.thinkaurelius.titan.diskstorage.StaticBuffer; //导入方法依赖的package包/类
public static final WriteBuffer put(WriteBuffer out, StaticBuffer in) {
for (int i=0;i<in.length();i++) out.putByte(in.getByte(i));
return out;
}
示例5: of
import com.thinkaurelius.titan.diskstorage.StaticBuffer; //导入方法依赖的package包/类
public static Entry of(StaticBuffer buffer) {
return new StaticArrayEntry(buffer,buffer.length());
}
示例6: getSize
import com.thinkaurelius.titan.diskstorage.StaticBuffer; //导入方法依赖的package包/类
@Override
public int getSize(StaticBuffer data) {
return data.length();
}
示例7: compareTo
import com.thinkaurelius.titan.diskstorage.StaticBuffer; //导入方法依赖的package包/类
@Override
public int compareTo(StaticBuffer other) {
int otherLen = (other instanceof Entry)?((Entry) other).getValuePosition():other.length();
return compareTo(getValuePosition(),other, otherLen);
}
示例8: toLockCol
import com.thinkaurelius.titan.diskstorage.StaticBuffer; //导入方法依赖的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();
}