Java 8 ObjID - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 ObjID class.

This code example shows how to use the following methods:
 
        Registry testImpl = LocateRegistry.createRegistry(PORT);
        System.err.println("created test registry on port " + PORT);
 
        RemoteRef ref = new UnicastRef(
            new LiveRef(new ObjID(ObjID.REGISTRY_ID),
                        new TCPEndpoint("", PORT), false));
        Registry referenceStub = new ReferenceRegistryStub(ref);
        System.err.println("created reference registry stub: " +
                           referenceStub);
 
        referenceStub.bind(NAME, referenceStub);
        System.err.println("bound name \"" + NAME + "\" in registry");
 
        String[] list = referenceStub.list();
        System.err.println("list of registry contents: " +
                           Arrays.asList(list));
        if (list.length != 1 || !list[0].equals(NAME)) {
            throw new RuntimeException(
                "TEST FAILED: unexpected list contents"); 
3
CodeRank
This code example shows how to use the following methods:
    // for the moment, used only by TransparentIndirection 
    protected transient Object serverIndirectionObject; 
 
    public RemoteValueHolder() { 
        // This assigns unique id to the remote value holder when it is created. 
        this.id = new ObjID();
    } 
     
    public RemoteValueHolder(ObjID id) {
        this.id = id;
    } 
 
    /** 
     * If the reference object is mapped thru one to one mapping and the object derives its primary key value 
     * from this relationship then remote value holder has a primary key row for. 
     */ 
    protected boolean canDoCacheCheck() { 
        if ((getMapping() == null) || (getQuery() == null)) { 
            return false; 
        } 
3
CodeRank
This code example shows how to use the following methods:
 
    /** Return if the stream is closed */ 
    protected boolean isClosed;
 
    public RemoteScrollableCursor(ScrollableCursor serverScrollableCursor) {
        this.id = new ObjID();
        this.isClosed = serverScrollableCursor.isClosed();
    } 
 
    /** 
     * Moves the cursor to the given row number in the result set 
     */ 
    public boolean absolute(int rows) throws DatabaseException {
        clearNextAndPrevious(); 
        return ((DistributedSession)getSession()).getRemoteConnection().scrollableCursorAbsolute(getID(), rows);
    } 
 
    /** 
     * Moves the cursor to the end of the result set, just after the last row. 
     */ 
3
CodeRank
This code example shows how to use the following methods:
 
        Registry testImpl = LocateRegistry.createRegistry(PORT);
        System.err.println("created test registry on port " + PORT);
 
        RemoteRef ref = new UnicastRef(
            new LiveRef(new ObjID(ObjID.REGISTRY_ID),
                        new TCPEndpoint("", PORT), false));
        Registry referenceStub = new ReferenceRegistryStub(ref);
        System.err.println("created reference registry stub: " +
                           referenceStub);
 
        referenceStub.bind(NAME, referenceStub);
        System.err.println("bound name \"" + NAME + "\" in registry");
 
        String[] list = referenceStub.list();
        System.err.println("list of registry contents: " +
                           Arrays.asList(list));
        if (list.length != 1 || !list[0].equals(NAME)) {
            throw new RuntimeException(
                "TEST FAILED: unexpected list contents"); 
3
CodeRank
See Code Examples for Java 8 ObjID Methods: