當前位置: 首頁>>代碼示例>>Java>>正文


Java Registration.getId方法代碼示例

本文整理匯總了Java中org.apache.tinkerpop.shaded.kryo.Registration.getId方法的典型用法代碼示例。如果您正苦於以下問題:Java Registration.getId方法的具體用法?Java Registration.getId怎麽用?Java Registration.getId使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.apache.tinkerpop.shaded.kryo.Registration的用法示例。


在下文中一共展示了Registration.getId方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getRegistration

import org.apache.tinkerpop.shaded.kryo.Registration; //導入方法依賴的package包/類
public Registration getRegistration(final Class clazz) {
    if (Color.class.isAssignableFrom(clazz)) {
        final Registration registration = super.getRegistration(TinkerGraph.class);
        return new Registration(registration.getType(), colorToGraphSerializer, registration.getId());
    } else {
        return super.getRegistration(clazz);
    }
}
 
開發者ID:ShiftLeftSecurity,項目名稱:tinkergraph-gremlin,代碼行數:9,代碼來源:TinkerGraphTest.java

示例2: register

import org.apache.tinkerpop.shaded.kryo.Registration; //導入方法依賴的package包/類
@Override
public Registration register(final Registration registration) {
    if (null == registration) throw new IllegalArgumentException("Registration cannot be null.");
    if (registration.getId() != NAME) idToRegistration.put(registration.getId(), registration);

    classToRegistration.put(registration.getType(), registration);
    if (registration.getType().isPrimitive())
        classToRegistration.put(getWrapperClass(registration.getType()), registration);
    return registration;
}
 
開發者ID:PKUSilvester,項目名稱:LiteGraph,代碼行數:11,代碼來源:GryoClassResolver.java

示例3: writeClass

import org.apache.tinkerpop.shaded.kryo.Registration; //導入方法依賴的package包/類
@Override
public Registration writeClass(final Output output, final Class type) {
    if (null == type) {
        output.writeVarInt(Kryo.NULL, true);
        return null;
    }

    final Registration registration = kryo.getRegistration(type);
    if (registration.getId() == NAME)
        writeName(output, type);
    else
        output.writeVarInt(registration.getId() + 2, true);

    return registration;
}
 
開發者ID:PKUSilvester,項目名稱:LiteGraph,代碼行數:16,代碼來源:GryoClassResolver.java


注:本文中的org.apache.tinkerpop.shaded.kryo.Registration.getId方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。