blob: bb27c5bf1b9360e537e08bcc6d06f18c85793ad2 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
/*******************************************************************************
* Copyright (c) 2000, 2004 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.core.filebuffers;
/**
* A file buffer manager (see
* {@link org.eclipse.core.filebuffers.IFileBufferManager}uses a
* <code>ISynchronizationContext</code> in order to execute commands
* encapsulated as {@link java.lang.Runnable}. The synchronization context
* executes the <code>Runnables</code> according to a specific
* synchronization/execution policy. This could be that the given
* <code>Runnable</code> is executed in a specific thread or environment or
* adhere to specific timing constraints. The concrete characteristics of the
* policy is to be specified by the context implementer.
* <p>
* This interface can be implemented by clients. Clients use
* {@link org.eclipse.core.filebuffers.IFileBufferManager#setSynchronizationContext(ISynchronizationContext)}
* to install a particular synchronization context with a file buffer manager.
*
* @since 3.0
*/
public interface ISynchronizationContext {
/**
* Executes the given runnable according to the specified
* synchronization/execution policy.
*
*
* @param runnable the runnable to be executed
*/
void run(Runnable runnable);
}
|