1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License, Version 1.0 only 6 * (the "License"). You may not use this file except in compliance 7 * with the License. 8 * 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 * or http://www.opensolaris.org/os/licensing. 11 * See the License for the specific language governing permissions 12 * and limitations under the License. 13 * 14 * When distributing Covered Code, include this CDDL HEADER in each 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 * If applicable, add the following below this CDDL HEADER, with the 17 * fields enclosed by brackets "[]" replaced with your own identifying 18 * information: Portions Copyright [yyyy] [name of copyright owner] 19 * 20 * CDDL HEADER END 21 */ 22 /* 23 * Copyright 2003 Sun Microsystems, Inc. All rights reserved. 24 * Use is subject to license terms. 25 * 26 *ident "%Z%%M% %I% %E% SMI" 27 * 28 */ 29 30 package com.sun.solaris.domain.pools; 31 32 /** 33 * The <code>DRM</code> interface specifies the contract between 34 * poold and higher level partitioning agents. 35 * 36 * <code>Poold</code> is designed to operate indepedently or as a 37 * member of a hierarchy of co-operating resource managers. In order 38 * to promote interaction and minimise implementation dependencies, 39 * the use of a common protocol which may be implemented in multiple 40 * languages is advocated. The protocol is provisionally named the 41 * "Distributed Resource Management" (DRM) protocol. 42 * 43 * This interface specifies how an implementation of the protocol 44 * would be implemented in Java. 45 * 46 * @see LogDRM 47 */ 48 49 interface DRM { 50 /** 51 * Connect to a higher level partitioning agent. 52 * 53 * @param version The version of the protocol. 54 * @param url The location of the agent. 55 * @throws Exception If the connect fails. 56 */ connect(int version, String url)57 public void connect(int version, String url) throws Exception; 58 59 /** 60 * Disconnect from a higher level partitioning agent. 61 * 62 * @throws Exception If the client is not connected. 63 */ disconnect()64 public void disconnect() throws Exception; 65 66 /** 67 * Request resources via a higher level partitioning agent. 68 * 69 * @throws Exception If the request fails. 70 */ request()71 public void request() throws Exception; 72 73 /** 74 * Offer resources via a higher level partitioning agent. 75 * 76 * @throws Exception If the offer fails. 77 */ offer()78 public void offer() throws Exception; 79 80 /** 81 * Cancel a previous offer or request. 82 * 83 * @throws Exception If the cancel fails. 84 */ cancel()85 public void cancel() throws Exception; 86 } 87