org.codehaus.wadi.core.util
Class Utils
java.lang.Object
org.codehaus.wadi.core.util.Utils
public class Utils
- extends java.lang.Object
A collection of useful static functions
- Version:
- $Revision: 2415 $
- Author:
- Jules Gosnell
Field Summary |
protected static org.apache.commons.logging.Log |
_lockLog
|
protected static org.apache.commons.logging.Log |
_log
|
Constructor Summary |
Utils()
|
Method Summary |
static void |
acquireUninterrupted(java.lang.String lockType,
java.lang.String lockName,
java.util.concurrent.locks.Lock sync)
|
static byte[] |
getContent(java.io.Externalizable object,
Streamer streamer)
|
static Motable |
mote(Emoter emoter,
Immoter immoter,
Motable emotable,
java.lang.String name)
Mote (in other words - move) the data held in a Motable from one Contextualiser to another, such
that if the two Contextualisers store Motables in a persistant fashion, the data is never
present in less than one of the two. |
static void |
release(java.lang.String lockType,
java.lang.String lockName,
java.util.concurrent.locks.Lock sync)
|
static java.io.Externalizable |
setContent(java.io.Externalizable object,
byte[] content,
Streamer streamer)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_log
protected static final org.apache.commons.logging.Log _log
_lockLog
protected static final org.apache.commons.logging.Log _lockLog
Utils
public Utils()
mote
public static Motable mote(Emoter emoter,
Immoter immoter,
Motable emotable,
java.lang.String name)
- Mote (in other words - move) the data held in a Motable from one Contextualiser to another, such
that if the two Contextualisers store Motables in a persistant fashion, the data is never
present in less than one of the two.
- Parameters:
emoter
- - delegate for the source Contextualiserimmoter
- - delegate for the target Contextualiseremotable
- - data to be movedname
- - the id of said data
- Returns:
- - the resulting immotable - in other words - the data's new representation in the target Contextualiser
acquireUninterrupted
public static void acquireUninterrupted(java.lang.String lockType,
java.lang.String lockName,
java.util.concurrent.locks.Lock sync)
throws java.util.concurrent.TimeoutException
- Throws:
java.util.concurrent.TimeoutException
release
public static void release(java.lang.String lockType,
java.lang.String lockName,
java.util.concurrent.locks.Lock sync)
getContent
public static byte[] getContent(java.io.Externalizable object,
Streamer streamer)
throws java.io.IOException
- Throws:
java.io.IOException
setContent
public static java.io.Externalizable setContent(java.io.Externalizable object,
byte[] content,
Streamer streamer)
throws java.io.IOException,
java.lang.ClassNotFoundException
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
Copyright © 2011. All Rights Reserved.