public ContainerPort ReservePort(ushort suggestedPort) { rwlock.EnterUpgradeableReadLock(); try { if (port == null) { rwlock.EnterWriteLock(); try { port = new ContainerPort(suggestedPort, this.user); } finally { rwlock.ExitWriteLock(); } } else { log.Trace("Container '{0}' already assigned port '{1}'", handle, port); } } finally { rwlock.ExitUpgradeableReadLock(); } return(port); }
public static void CleanUp(string handle) { ContainerUser.CleanUp(handle); ContainerDirectory.CleanUp(handle); ContainerPort.CleanUp(handle, 0); // TODO }