Snapshot current state.
160519
def snapshot(self):
        """"""
        self._snapshot = {
            'name': self.name,
            'volume': self.volume,
            'muted': self.muted,
            'latency': self.latency
        }
        _LOGGER.info('took snapshot of current state of %s', self.friendly_name)
748319
def set_current_state(self):
        """""""
        if not self.thresholds:
            self.thresholds = self.parent.get_existing_keyword('thresholds')
        if not self.value_maps:
            self.value_maps = self.parent.get_existing_keyword('value_maps')
157795
protected void completeSnapshot(Snapshot snapshot) {
    Assert.notNull(snapshot, "snapshot");
    snapshots.put(snapshot.index(), snapshot);

    if (currentSnapshot == null || snapshot.index() > currentSnapshot.index()) {
      currentSnapshot = snapshot;
    }

    // Delete old snapshots if necessary.
    if (!storage.retainStaleSnapshots()) {
      Iterator<Map.Entry<Long, Snapshot>> iterator = snapshots.entrySet().iterator();
      while (iterator.hasNext()) {
        Snapshot oldSnapshot = iterator.next().getValue();
        if (oldSnapshot.index() < currentSnapshot.index()) {
          iterator.remove();
          oldSnapshot.close();
          oldSnapshot.delete();
        }
      }
    }
  }
313736
def snapshots(self):
        
        j, _ = self.datacenter.request('GET', self.path + '/snapshots')
        return [Snapshot(machine=self, data=s) for s in j]
243650
def cli(env):
    """"""

    manager = AccountManager(env.client)
    summary = manager.get_summary()
    env.fout(get_snapshot_table(summary))
14187
def restore_snapshot(self, subid, snapshotid, params=None):
        ''' 
        '''
        params = update_params(params, {
            'SUBID': subid,
            'SNAPSHOTID': snapshotid
        })
        return self.request('/v1/server/restore_snapshot', params, 'POST')
867797
def snapshot(ctx, board, done):
    
    ctx.obj['board_id'] = board
    ts = TrelloStats(ctx.obj)
    Snapshot.create_table(fail_silently=True)
    done_id = ts.get_list_id_from_name(done)
    ct = cycle_time(ts, board, done)
    env = get_env()
    print render_text(env, **dict(cycle_time=ct))

    # Create snapshot
    print Snapshot.create(board_id=board, done_id=done_id, cycle_time=ct)
277592
def snapshot_agents(self, force=False):
        ''''''
        for agent in self._agents:
            agent.check_if_should_snapshot(force)
1223930
@Override
	public void snapshotState(FunctionSnapshotContext context) throws Exception {
		Preconditions.checkState(this.checkpointedState != null,
			"The " + getClass().getSimpleName() + " has not been properly initialized.");

		this.checkpointedState.clear();
		this.checkpointedState.add(this.numElementsEmitted);
	}
1201767
private void open() {
    for (Snapshot snapshot : loadSnapshots()) {
      snapshots.put(snapshot.index(), snapshot);
    }

    if (!snapshots.isEmpty()) {
      currentSnapshot = snapshots.lastEntry().getValue();
    }
  }
299409
def _snapshot(self) -> Dict[str, Any]:
        
        try:
            return {name: item._snapshot for name, item in self._nested_items.items()}
        except Exception as e:
            raise SnapshotError('Error while creating snapshot for {}'.format(self._name)) from e
406246
def handle_current_state(self):
        '''
        
        '''
        if getattr(self, '_current_state_hydrated_changed', False) and self.save_on_change:
            new_base_state = json.dumps(getattr(self, '_current_state_hydrated', {}))
            if new_base_state != self.base_state:
                self.base_state = new_base_state
                self.save()
678733
function(thing) {
    if (L.existy(thing) && L.existy(thing.snapshot))
      return thing.snapshot();
    else
      fail("snapshot not currently implemented")
      //return L.snapshot(thing);
  }
1043339
def state(self, state: str) -> None:
        """"""
        self._state = state
        for callback in self._callbacks:
            callback()
133803
def cli(env, snapshot_id):
    """"""
    block_manager = SoftLayer.BlockStorageManager(env.client)
    deleted = block_manager.delete_snapshot(snapshot_id)

    if deleted:
        click.echo('Snapshot %s deleted' % snapshot_id)
1133750
@Override
	public void snapshotState(FunctionSnapshotContext context) throws Exception {
		Preconditions.checkState(this.checkpointedState != null,
			"The " + getClass().getSimpleName() + " state has not been properly initialized.");

		this.checkpointedState.clear();
		this.checkpointedState.add(this.globalModificationTime);

		if (LOG.isDebugEnabled()) {
			LOG.debug("{} checkpointed {}.", getClass().getSimpleName(), globalModificationTime);
		}
	}
1162722
def current_view(self):
        ''''''
        state = self.state
        return (state.lat, state.lon, state.width, state.height,
                state.ground_width, state.mt.tiles_pending())