NOT SYNCHRONIZED! Call only from a synch'd method.

@return a new struct, not null.
498763
private IonStruct makeIonRepresentation(ValueFactory factory)
    {
        IonStruct ionRep = factory.newEmptyStruct();

        ionRep.addTypeAnnotation(ION_SYMBOL_TABLE);

        SymbolTable[] importedTables = getImportedTablesNoCopy();

        if (importedTables.length > 1)
        {
            IonList importsList = factory.newEmptyList();
            for (int i = 1; i < importedTables.length; i++)
            {
                SymbolTable importedTable = importedTables[i];
                IonStruct importStruct = factory.newEmptyStruct();

                importStruct.add(NAME,
                                 factory.newString(importedTable.getName()));
                importStruct.add(VERSION,
                                 factory.newInt(importedTable.getVersion()));
                importStruct.add(MAX_ID,
                                 factory.newInt(importedTable.getMaxId()));

                importsList.add(importStruct);
            }
            ionRep.add(IMPORTS, importsList);
        }

        if (mySymbolsCount > 0)
        {
            int sid = myFirstLocalSid;
            for (int offset = 0; offset < mySymbolsCount; offset++, sid++)
            {
                String symbolName = mySymbolNames[offset];
                recordLocalSymbolInIonRep(ionRep, symbolName, sid);
            }
        }

        return ionRep;
    }
128503
static <T> boolean syncInstantiation(T objectType) {
        List<Template> templates = new ArrayList<>();
        Templates tr = TEMP_FINDER.findAnnotations(templates, objectType);
        if (tr == null) {
            /* Default to synchronous instantiation */
            return true;
        } else {
            return tr.syncInstantiation();
        }
    }
936379
public SyncLazyFuture<X> withRunningThread() {
        if (state != null) return this;
        Thread thread = new Thread(SyncLazyFuture.this.getClass().getName() + ".withRunningThread") {
            @Override
            public void run() {
                try {
                    SyncLazyFuture.this.internalCalc();
                } catch (ExecutionException | InterruptedException e) {
                    e.printStackTrace();
                }
            }
        };
        thread.start();
        return this;
    }
597879
public Cache createRAMCache(Struct arguments) throws IOException {
	RamCache rc = new RamCache();
	if (arguments == null) arguments = new StructImpl();
	rc.init(this, "" + CreateUniqueId.invoke(), arguments);
	return rc;
    }
224435
public Iterator iterator() {
        return new Iterator() {
            private LeftTupleSinkNode currentNode = null;
            private LeftTupleSinkNode nextNode    = getFirst();

            public boolean hasNext() {
                return (this.nextNode != null);
            }

            public Object next() {
                this.currentNode = this.nextNode;
                if ( this.currentNode != null ) {
                    this.nextNode = this.currentNode.getNextLeftTupleSinkNode();
                } else {
                    throw new NoSuchElementException( "No more elements to return" );
                }
                return this.currentNode;
            }

            public void remove() {
                if ( this.currentNode != null ) {
                    LeftTupleSinkNodeList.this.remove( this.currentNode );
                    this.currentNode = null;
                } else {
                    throw new IllegalStateException( "No item to remove. Call next() before calling remove()." );
                }
            }
        };
    }
278379
@Override
	public synchronized T get() {
		@Nullable T checkedObject = this.object;

		if (checkedObject == null) {
			this.object = checkedObject = Objects.requireNonNull(this.initializer.get());
		}
		return checkedObject;
	}
631884
public JBBPDslBuilder Struct(final String name) {
    final Item item = new Item(BinType.STRUCT, name, this.byteOrder);
    this.addItem(item);
    this.openedStructCounter++;
    return this;
  }
381409
static StructrMethodDefinition deserialize(final StructrTypeDefinition parent, final String name, final Map<String, Object> source) {

		final StructrMethodDefinition newMethod = new StructrMethodDefinition(parent, name);

		newMethod.deserialize(source);

		return newMethod;
	}
202303
public final boolean makesStructs() {
    if (!hasInstanceType()) {
      return false;
    }
    if (propAccess == PropAccess.STRUCT) {
      return true;
    }
    FunctionType superc = getSuperClassConstructor();
    if (superc != null && superc.makesStructs()) {
      setStruct();
      return true;
    }
    return false;
  }
257098
private BaseEntity<?> marshal() {
    marshalKey();
    if (key instanceof Key) {
      entityBuilder = Entity.newBuilder((Key) key);
    } else {
      entityBuilder = FullEntity.newBuilder(key);
    }
    marshalFields();
    marshalAutoTimestampFields();
    if (intent == Intent.UPDATE) {
      marshalVersionField();
    }
    marshalEmbeddedFields();
    return entityBuilder.build();
  }
380446
public final int appendStruct(boolean isNull) {
    if (isNull) {
      appendNull();
      for (WritableColumnVector c: childColumns) {
        if (c.type instanceof StructType) {
          c.appendStruct(true);
        } else {
          c.appendNull();
        }
      }
    } else {
      appendNotNull();
    }
    return elementsAppended;
  }
757301
public synchronized Node nonMasterNode() {
        final ClusterState state = client().admin().cluster().prepareState().execute().actionGet().getState();
        final String name = state.nodes().getMasterNode().getName();
        for (final Node node : nodeList) {
            if (!node.isClosed() && !name.equals(node.settings().get(NODE_NAME))) {
                return node;
            }
        }
        return null;
    }
122772
def copy(self, parent=None):
        """"""
        new = Structure(None, parent=parent)
        new.key = self.key
        new.type_ = self.type_
        new.val_guaranteed = self.val_guaranteed
        new.key_guaranteed = self.key_guaranteed
        for child in self.children:
            new.children.append(child.copy(new))
        return new
733033
public synchronized T getNonBlocking ()
    {
        if (_count == 0) {
            return null;
        }

        // pull the object off, and clear our reference to it
        T retval = _items[_start];
        _items[_start] = null;

        _start = (_start + 1) % _size;
        _count--;

        return retval;
    }
705096
public T build() {
        C clientObject = client;
        if (clientObject == null) {
            clientObject = createClient();
        }

        return factory.create(clientObject);
    }
295105
def from_time_struct(cls, time_struct):
        
        instance = super().__new__(cls, time_struct)
        instance.initialize(time_struct)
        return instance
275796
public final MutableObjectIterator<BinaryRow> getIterator() {
		return new MutableObjectIterator<BinaryRow>() {
			private final int size = size();
			private int current = 0;

			private int currentSegment = 0;
			private int currentOffset = 0;

			private MemorySegment currentIndexSegment = sortIndex.get(0);

			@Override
			public BinaryRow next(BinaryRow target) {
				if (this.current < this.size) {
					this.current++;
					if (this.currentOffset > lastIndexEntryOffset) {
						this.currentOffset = 0;
						this.currentIndexSegment = sortIndex.get(++this.currentSegment);
					}

					long pointer = this.currentIndexSegment.getLong(this.currentOffset);
					this.currentOffset += indexEntrySize;

					try {
						return getRecordFromBuffer(target, pointer);
					} catch (IOException ioe) {
						throw new RuntimeException(ioe);
					}
				} else {
					return null;
				}
			}

			@Override
			public BinaryRow next() {
				throw new RuntimeException("Not support!");
			}
		};
	}